Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 9 Using Data Object Broker User Exits : Data Layouts

Data Layouts
USREXTPL Usage and Mapping
In USREXTPL, if a pointer (except for the one for the Initialization exit) is 0 or has the high‑order bit turned on, the corresponding exit routine is not invoked during Data Object Broker processing. You turn the high‑order bit off to enable the exit. You can use this to dynamically control which exits are taken. If you use this technique, you must take care to ensure correct serialization of the user exits.
This is a map of USREXTPL, the general parameter list of the user exits (all fields default to zero):
Pointer to the File Management Checkpoint user exit.
Data Object Broker Initialization Done Data Block
This is a map of the Data Object Broker Parameter Setting data block:
Half-word maximum number of concurrent messages being processed.
Half-word maximum number of transactions per checkpoint.
Redolog Entries
The redolog has two distinct formats. To determine the applicable format, look at the first two bytes.
Format 1:
If the first two bytes of the intent list are X'0001', the intent list is in format 1, which is described in the following tables.
Format 1 Header Layout:
Offset
Length
“ ” (X'40') retain locks
“R” (X'D9') release locks (end of transaction)
Format 1 Intent Body Layout:
Length can be 1 or 2 bytes. If the highorder bit is on, it is a 2byte length.

1
R1PARMS contains the table parameter values in variable format if they are required for the table being updated. The entries consist of a 1-byte length field (the maximum length of an individual parameter is 127) followed by the data for each parameter.

2
R1BROWL is the length of the data occurrence.

3
R1BF1L and R1BF1V are repeated for each field in the table. If the high-order bit of R1BF1L is on for a field, this length field is two bytes long and the actual data length can be obtained by turning off this high order bit.

Format 2
If the first two bytes of the intent list are not X'0001', the intent list is in format 2, which is described in the following tables.
Format 2 Header Layout:
Length of the Intent-list data (includes itself, is 2 bytes shorter than the length passed as the second parameter to the Redolog-1, Redolog-2, and Recovery exits).
“ ” (X'40') retain locks
“R” (X'D9') release locks (end of transaction)
Format 2 Intent Body Layout:
“ ” (X'40') retain locks
“R” (X'D9') release locks (end of transaction)

1
R2BOPARM, if non zero, contains an offset from the start of this Intent body to the parameter data for this request. The parameter values are in variable format if they are present for the table being processed. The entries consist of a 1-byte length field (the maximum length of an individual parameter is 127) followed by the data for each of the parameters. For a MOVTAB request, this field is overlaid with the segment number to which the table is to be relocated.

2
R2BOMISC, if non-zero, contains an offset from the start of this Intent body to the name of the key to be used for a Secondary Index Build or Delete. The Key value is 16 bytes long with the key padded with blanks on the right if necessary.

Redolog Header
 
X'01' – FILETASK initialized
X'02' – Normal shutdown
X'04' – Segment online
X'08' – Segment offline
X'10' – FILETASK notified, checkpoint complete
X'20' – Intent list entry
X'40' – Last block of chain 1
X'80' – Checkpoint request initiated
X'00' – Dummy entry

1
The RLBLOCK# and the x'40' bit in the RLTYPE field can be ignored. These are used internally by TIBCO Object Service Broker when it splits intents across multiple 4-KB records in its redolog data set. Only Intent-list entries are seen by the user-exit processing. The field RLTYPE for these entries is either x'20' or x'60'. The Redolog-1 and Redolog‑2 exits are passed the complete Intent-list entry once for each commit request.

2
For an Intent-list entry, the field RLSEQ# is a number between x'00000001' and x'00FFFFFE' that is incremented for each Commit transaction processed by the Data Object Broker. For Intents passed to the Redolog-1 and Redolog‑2 exits, this number is incremented sequentially and wraps back to 1 when the maximum possible value is reached. Under certain circumstances, it is possible for this value to be incremented by more than 1 for consecutive intents passed to the Redolog-1 and Redolog‑2 exit processing.

Redolog-Entry Samples
Sample Table Definition
These samples use the EXIT_SAMPLE table, which is defined as follows:

 
COMMAND==> TABLE DEFINITION
Table: EXIT_SAMPLE Type: TDS Unit: USR040 IDgen: N
Source:
Parameter Name Typ Syn Len Dec Class ' Event Rule Typ Acc
---------------- - -- --- -- - ' ---------------- - -
_ PARAMETER1 S C 4 0 D ' _
_ PARAMETER2 S C 4 0 D ' _
_ PARAMETER3 S C 4 0 D ' _
_ PARAMETER4 S C 4 0 D ' _
Field Name Typ Syn Len Dec Key Ord Rqd Default Reference
---------------- - -- ---- -- - - - ---------------- ----------------
_ KEY Q B 4 0 P
_ DATA S V 256 0
_
 _
 _
 _
 _
 _
 _
_
PFKEYS: 3=END 12=CANCEL 22=DELETE 13=PRINT 14=FIELDS 21=DATA 2=DOC

 
The following samples are produced on entry to the Redolog-1 user exit. For the SIXBUILD and SIXDELETE samples, the length of field DATA is reduced to 127.
Sample 1
This is a format-1 intent list produced by adding two rows to the EXIT_SAMPLE table for the 'P1','P2','P3','P4' instance with keys of 1 and 2. The data field of the second row is padded with the character “X” to illustrate a two-byte length field.
Parameter list passed to the Redolog-1 user exit:

 
0007A2A8 46E48C20 00000176 *.U......*
0007A2B0 0007A0B0 00000018 C4E9C3F1 F0404040 *........DZC10 *
0007A2C0 00000001 *................*

 
Redolog header passed to the Redolog-1 for this intent:

 
0007A0B0 01A66001 00000018 00000018 00063000 *.w-.............*
0007A0C0 01000176 BC1A974D C5F0AC00 000000E5 *......p(E0.....V*
0007A0D0 0000C139 0000E020 D9C5C4D6 C4C1E3C1 *..A...\.REDODATA*

 
Actual format-1 Intent entry:
Sample 2
This is a format-1 intent list produced by deleting the row of key 1 of the two rows added by the previous sample and replacing the row of key 2. The data field of the second row is padded with the character “Z” to illustrate a two-byte length field.
Parameter list passed to the Redolog-1 user exit:
Redolog header passed to the Redolog-1 for this intent:

 
0007A0B0 01A66001 00000018 00000018 00063000 *.w-.............*
0007A0C0 01000176 BC1A9E35 1497A900 000000F8 *.........pz....8*
0007A0D0 0000C139 000177E1 D9C5C4D6 C4C1E3C1 *..A.... REDODATA*

 
Actual format-1 Intent entry:
*FIELD.ZZZZZZZZZ*
Sample 3
This is a format-2 intent list using $CLRTAB to clear the 'P1','P2','P3','P4' instance of EXIT_SAMPLE.
Parameter list passed to the Redolog-1 user exit:

 
0007A2A8 46E46F20 0000005A *.U?....!*
0007A2B0 0007A0B0 00000018 C4E9C3F1 F0404040 *........DZC10 *
0007A2C0 00000001 *................*

 
Redolog header passed to the Redolog-1 for this intent:

 
0007A0B0 008A6001 00000018 00000018 00063000 *..-.............*
0007A0C0 0100005A BC1A983D 81150700 000000E6 *...!..q.a......W*
0007A0D0 0000C139 0000E1C6 D9C5C4D6 C4C1E3C1 *..A... FREDODATA*

 
Actual format-2 Intent entry:
Sample 4
This is a format-2 intent list using SIXBUILD to build a secondary index on field DATA of EXIT_SAMPLE.
Parameter list passed to the Redolog-1 user exit:

 
0007A2A8 46E48C20 00000064 *.U......*
0007A2B0 0007A0B0 00000018 C4E9C3F1 F0404040 *........DZC10 *
0007A2C0 00000001 *................*

 
Redolog Header passed to the Redolog-1 for this intent:

 
0007A0B0 00946001 00000018 00000018 00063000 *.m-.............*
0007A0C0 01000064 BC1AA069 59079200 0000011B *..........k.....*
0007A0D0 0000C139 00019D4E D9C5C4D6 C4C1E3C1 *..A....+REDODATA*

 
Actual format-2 Intent entry:
Sample 5
This is a format-2 intent list using SIXDELETE to delete a secondary index on field DATA of EXIT_SAMPLE.
Parameter list passed to the Redolog-1 user exit:

 
0007A2A8 46E47020 00000064 *.U......*
0007A2B0 0007A0B0 00000018 C4E9C3F1 F0404040 *........DZC10 *
0007A2C0 00000001 *................*

 
Redolog header passed to the Redolog-1 for this intent:

 
0007A0B0 00946001 00000018 00000018 00063000 *.m-.............*
0007A0C0 01000064 BC1AA387 37648F00 0000011C *......tg........*
0007A0D0 0000C139 00019DE2 D9C5C4D6 C4C1E3C1 *..A....SREDODATA*

 
Actual format-2 Intent entry:
Sample 6
This is a format-2 intent list using MOVTAB to move table EXIT_SAMPLE to segment 2 from segment 1.
Parameter list passed to the Redolog-1 user exit:

 
0007A2A8 46E46A20 0000004C *.U¦....<*
0007A2B0 0007A0B0 00000018 C4E9C3F1 F0404040 *........DZC10 *
0007A2C0 00000001 *................*

 
Redolog header passed to the Redolog-1 for this intent:
Actual format-2 Intent entry:

 
46E46A20 004A0001 00001E40 40000001 80407C00 *.¢..... .... @.*
46E46A30 00001E40 C5E7C9E3 6DE2C1D4 D7D3C540 *... EXIT_SAMPLE *
46E46A40 40404040 E3C4E240 00020000 00000000 * TDS ........*
46E46A50 00000000 00000000 00000000 00000000 *................*
46E46A60 00000000 00000000 0000 *..............C.*

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved