GTF writer header section
The length and content of the writer header section differs between SMF and GTF records, but the other sections of the records are the same for SMF and GTF.
The GTF writer header section
begins at the first byte of the record. After establishing addressability,
you can examine the fields of the header. The writer headers for trace
records sent to GTF are always mapped by macro DSNDQWGT. The fields
are described in Table 1.
| Offset | Macro DSNDQWGT field | Description |
|---|---|---|
| 0 | QWGTLEN | Length of Record |
| 2 | Reserved | |
| 4 | QWGTAID | Application identifier |
| 5 | QWGTFID | Format ID |
| 6 | QWGTTIME | Timestamp; you must specify TIME=YES when you start GTF. |
| 14 | QWGTEID | Event ID: X'EFB9' |
| 16 | QWGTASCB | ASCB address |
| 20 | QWGTJOBN | Job name |
| 28 | QWGTHDRE | Extension to header |
| 28 | QWGTDLEN | Length of data section |
| 30 | QWGTDSCC | Segment control code
0=Complete 2=Last 1=First 3=Middle |
| 31 | QWGTDZZ2 | Reserved |
| 32 | QWGTSSID | Subsystem ID |
| 36 | QWGTWSEQ | Sequence number |
| 40 | QWGTEND | End of GTF header |
DFSERA10 - PRINT PROGRAM
000000 001A0000 0001FFFF 94B6A6E9 BD6636FA 5C021000 00010000 0000
A B C D E F
000000 011C0000 FF00A6E9 C33E28F7 DD03EFB9 00F91400 E2E2D6D7 D4E2E3D9 01000100
G H I J K L M N O
000020 E2E2D6D7 00000001 000000A0 00980001 00000038 00680001 0060005E 4DE2E3C1
000040 D9E340E3 D9C1C3C5 404DE2E3 C1E3405D C3D3C1E2 E2404D5C 405DD9D4 C9C4404D
000060 5C405DC4 C5E2E340 4DC7E3C6 405DD7D3 C1D5404D 5C405DC1 E4E3C8C9 C4404D5C
000080 405DC9C6 C3C9C440 4D5C405D C2E4C6E2 C9E9C540 4D5C405D FFFFFFFF 00040101
P Q R S
0000A0 004C0110 000402xx 00B3ADB8 E2E2D6D7 A6E9C33E 28EF4403 00000006 00000001
T
0000C0 00000001 E2C1D5E3 C16DE3C5 D9C5E2C1 6DD3C1C2 C4C2F2D5 C5E34040 D3E4D5C4
0000E0 F0404040 A6E9C33E 271F0001 004C0200 E2E8E2D6 D7D94040 F0F2F34B C7C3E2C3
000100 D5F6F0F2 E2E2D6D7 40404040 40404040 40404040 E2E8E2D6 D7D94040
U
000000 00440000 FF00A6E9 C33E2901 1303EFB9 00F91400 E2E2D6D7 D4E2E3D9 00280200
000020 E2E2D6D7 00000001 00000000 00000000 00000000 00000000 00000000 00000000
000040 00000000 V
W X
000000 011C0000 FF00A6E9 C33E2948 E203EFB9 00F91400 E2E2D6D7 D4E2E3D9 01000100
000020 E2E2D6D7 00000002 000006D8 004C0001 00000090 001C0004 00000100 001C000E
000040 00000288 0018000E 00000590 00400001 000005D0 00740001 00000480 00440001
000060 000003D8 00800001 00000458 00280001 00000644 00480001 000004E4 00AC0001
000080 0000068C 004C0001 000004C4 00200001 D4E2E3D9 00000001 762236F2 00000000
0000A0 59F48900 001E001E 00F91400 C4C2D4F1 00000001 1A789573 00000000 95826100
0000C0 001F001F 00F90E00 C4C9E2E3 00000000 3413C60E 00000000 1C4D0A00 00220022
0000E0 00F90480 C9D9D3D4 00000000 0629E2BC 00000000 145CE000 001D001D 00F91600
000100 E2D4C640 00000046 00000046 00000000 00000000 00000000 00000000
Y
000000 011C0000 FF00A6E9 C33E294B 1603EFB9 00F91400 E2E2D6D7 D4E2E3D9 01000300
000020 E2E2D6D7 00000002 D9C5E240 00000000 00000000 00000000 00000000 00000000
000040 00000000 C7E3C640 00000001 00000001 00000000 00000000 00000000 00000000
000060 E2D9E540 00000000 00000000 00000000 00000000 00000000 00000000 E2D9F140
000080 00000156 000000D2 00000036 00000036 00000000 00000004 E2D9F240 00000000
0000A0 00000000 00000000 00000000 00000000 00000000 D6D7F140 00000000 00000000
0000C0 00000000 00000000 00000000 00000000 D6D7F240 00000000 00000000 00000000
0000E0 00000000 00000000 00000000 D6D7F340 00000000 00000000 00000000 00000000
000100 00000000 00000000 D6D7F440 00000000 00000000 00000000 00000000
Y
000000 011C0000 FF00A6E9 C33E294D 3C03EFB9 00F91400 E2E2D6D7 D4E2E3D9 01000300
000020 E2E2D6D7 00000002 00000000 00000000 D6D7F540 00000000 00000000 00000000
000040 00000000 00000000 00000000 D6D7F640 00000000 00000000 00000000 00000000
000060 00000000 00000000 D6D7F740 00000000 00000000 00000000 00000000 00000000
000080 00000000 D6D7F840 00000000 00000000 00000000 00000000 00000000 00000000
0000A0 00010000 0000000E 0000000D 00000000 00000000 00000000 00020000 0000000D
0000C0 0000000D 00000000 00000000 00000000 00030000 00000003 00000003 00000000
0000E0 00000000 00000000 00040000 00000006 00000006 00000000 00000000 00000000
000100 00050000 00000005 00000005 00000000 00000000 00000000 006A0000
Y
000000 011C0000 FF00A6E9 C33E294F 6103EFB9 00F91400 E2E2D6D7 D4E2E3D9 01000300
000020 E2E2D6D7 00000002 00000005 00000005 00000000 00000000 00000000 008C0000
000040 00000000 00000000 00000000 00000000 00000000 008D0000 00000000 00000000
⋮
Z
000000 00780000 FF00A6E9 C33E2957 D103EFB9 00F91400 E2E2D6D7 D4E2E3D9 005C0200
AA
000020 E2E2D6D7 00000002 00000000 004C011A 00010D31 02523038 E2E2D6D7 A6E9C33E
000040 29469A03 0000000E 00000002 00000001 E2C1D5E3 C16DE3C5 D9C5E2C1 6DD3C1C2
000060 40404040 40404040 40404040 40404040 A6E9B6B4 9A2B0001
| Key to Figure 1 | Description |
|---|---|
| A 011C | Record length (field QWGTLEN); beginning of GTF writer header section |
| B A6E9 C33E28F7 DD03 | Timestamp (field QWGTTIME) |
| C EFB9 | Event ID (field QWGTEID) |
| D E2E2D6D7 D4E2E3D9 | Job name (field QWGTJOBN) |
| E 0100 | Length of data section |
| F 01 | Segment control code (01 = first segment of the first record) |
| G E2E2D6D7 | Subsystem ID (field QWGTSSID) |
| H | End of GTF writer header section |
| I 000000A0 | Offset to product section; beginning of self-defining section |
| J 0098 | Length of product section |
| K 0001 | Number of times the product section is repeated |
| L 00000038 | Offset to first (in this case, only) data section |
| M 0068 | Length of data section |
| N 0001 | Number of times the data section is repeated |
| O 0060005E | Beginning of data section |
| P 004C0110... | Beginning of product section |
| Q 0004 | IFCID (field QWHSIID) |
| R 02 | Number of self-defining sections in the record (field QWHSNSDA) |
| S xx | Release indicator number (field QWHSRN); this varies according to the actual release level of Db2 you are using. |
| T E2C1D5E3... | Local location name (16 bytes) |
| U 02 | Last segment of the first record |
| V | End of first record |
| W | Beginning of GTF header for new record |
| X 01 | First segment of a spanned record (QWGTDSCC = QWGTDS01) |
| Y 03 | Middle segment of a spanned record (QWGTDSCC = QWGTDS03) |
| Z 02 | Last segment of a spanned record (QWGTDSCC = QWGTDS02) |
| AA 004C | Beginning of product section |
- Is the GTF event ID of the record equal to the Db2 ID (that
is, does QWGTEID = X'xFB9')?
If it is not equal, get another record.
If it is equal, continue processing.
- Is the record spanned? If it is spanned (that is, QWGTDSCC ¬ = QWGTDS00), test to determine whether it is the first, middle, or last segment of the spanned record.
- If it is the first segment (that is, QWGTDSCC = QWGTDS01), save the entire record including the sequence number (QWGTWSEQ) and the subsystem ID (QWGTSSID).
- If it is a middle segment (that is, QWGTDSCC = QWGTDS03), find the first segment matching the sequence number (QWGTSEQ) and on the subsystem ID (QWTGSSID). Then move the data portion immediately after the GTF header to the end of the previous segment.
- If it is the last segment (that is, QWGTDSCC = QWGTDS02),
find the first segment matching the sequence number (QWGTSEQ) and
on the subsystem ID (QWTGSSID). Then move the data portion immediately
after the GTF header to the end of the previous record.
Now process the completed record.
If it is not spanned, process the record.
The following figure shows the same output after it has been processed by a user-written routine, which follows the logic that was outlined previously.
000000 01380000 FF00A6E9 DCA7E275 1204EFB9 00F91400 E2E2D6D7 D4E2E3D9 011C0000
000020 E2E2D6D7 00000019 000000A0 00980001 00000038 00680001 0060005E 4DE2E3C1
000040 D9E340E3 D9C1C3C5 404DE2E3 C1E3405D C3D3C1E2 E2404D5C 405DD9D4 C9C4404D
000060 5C405DC4 C5E2E340 4DC7E3C6 405DD7D3 C1D5404D 5C405DC1 E4E3C8C9 C4404D5C
000080 405DC9C6 C3C9C440 4D5C405D C2E4C6E2 C9E9C540 4D5C405D 00000001 00040101
0000A0 004C0110 000402xx 00B3ADB8 E2E2D6D7 0093018F 11223310 0000000C 00000019
0000C0 00000001 E2C1D5E3 C16DE3C5 D9C5E2C1 6DD3C1C2 C4C2F2D5 C5E34040 D3E4D5C4
0000E0 F0404040 A6E9DCA7 DF960001 004C0200 E2E8E2D6 D7D94040 F0F2F34B C7C3E2C3
000100 D5F6F0F2 E2E2D6D7 40404040 40404040 40404040 E2E8E2D6 D7D94040 00000000
000120 00000000 00000000 00000000 00000000 00000000 00000000
A B
000000 07240000 FF00A6E9 DCA8060C 2803EFB9 00F91400 E2E2D6D7 D4E2E3D9 07080000
C D E
000020 E2E2D6D7 0000001A 000006D8 004C0001 00000090 001C0004 00000100 001C000E
000040 00000288 0018000E 00000590 00400001 000005D0 00740001 00000480 00440001
000060 000003D8 00800001 00000458 00280001 00000644 00480001 000004E4 00AC0001
F
000080 0000068C 004C0001 000004C4 00200001 D4E2E3D9 00000003 27BCFDBC 00000000
0000A0 AB000300 001E001E 00F91400 C4C2D4F1 00000001 1DE8AEE2 00000000 DB0CB200
0000C0 001F001F 00F90E00 C4C9E2E3 00000000 4928674B 00000000 217F6000 00220022
0000E0 00F90480 C9D9D3D4 00000000 07165F79 00000000 3C2EF500 001D001D 00F91600
000100 E2D4C640 0000004D 0000004D 00000000 00000000 00000000 00000000 D9C5E240
000120 00000000 00000000 00000000 00000000 00000000 00000000 C7E3C640 00000019
000140 00000019 00000000 00000000 00000000 00000000 E2D9E540 00000000 00000000
000160 00000000 00000000 00000000 00000000 E2D9F140 00000156 000000D2 00000036
000180 00000036 00000000 00000004 E2D9F240 00000092 00000001 00000091 00000091
0001A0 00000000 0000000C D6D7F140 00000002 00000001 00000001 00000000 00010000
0001C0 20000004 D6D7F240 00000000 00000000 00000000 00000000 00000000 00000000
0001E0 D6D7F340 00000000 00000000 00000000 00000000 00000000 00000000 D6D7F440
000200 00000000 00000000 00000000 00000000 00000000 00000000 D6D7F540 00000000
000220 00000000 00000000 00000000 00000000 00000000 D6D7F640 00000000 00000000
000240 00000000 00000000 00000000 00000000 D6D7F740 00000000 00000000 00000000
000260 00000000 00000000 00000000 D6D7F840 00000000 00000000 00000000 00000000
000280 00000000 00000000 00010000 00000042 00000011 00000030 00000000 00000000
0002A0 00020000 00000041 00000011 00000030 00000000 00000000 00030000 00000003
0002C0 00000003 00000000 00000000 00000000 00040000 0000000C 0000000C 00000000
0002E0 00000000 00000000 00050000 0000000B 0000000A 00000001 00000000 00000000
000300 006A0000 0000000C 0000000B 00000001 00000000 00000000 008C0000 00000000
000320 00000000 00000000 00000000 00000000 008D0000 00000000 00000000 00000000
000340 00000000 00000000 008E0000 00000000 00000000 00000000 00000000 00000000
000360 008F0000 00000000 00000000 00000000 00000000 00000000 00900000 00000000
000380 00000000 00000000 00000000 00000000 00910000 00000000 00000000 00000000
0003A0 00000000 00000000 00920000 00000000 00000000 00000000 00000000 00000000
0003C0 00CA0000 00000041 00000011 00000030 00000000 00000000 00000000 00000000
0003E0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
000400 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
000420 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
000440 00000000 00000000 00000000 00000004 00000000 00000000 000005D4 00000130
000460 0000000D 0000000A 00000029 00000009 000000C3 00000000 00000000 00000000
000480 00000001 0000000C 00000000 04A29740 00000000 00000000 00000001 00000000
0004A0 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0004C0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0004E0 00000000 E2C1D56D D1D6E2C5 40404040 40404040 00000000 00000002 00000003
000500 00000000 000004A8 000005C7 00000000 00000001 00000003 00000003 00000000
000520 00000001 00000000 00000001 00000000 00000000 00000000 00000000 00000000
000540 00000002 00000001 00000000 00000000 00000000 00000000 00000000 00000000
000560 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
000580 00000000 00000000 00000002 00000000 00000003 00000000 00000003 00000006
0005A0 00000000 00000000 00000000 00000000 00000005 00000003 00000000 00000000
0005C0 00000000 00000003 00000000 00000000 00000000 00000000 00000000 00000000
0005E0 00000000 00000000 0000000C 00000001 00000000 00000007 00000000 00000000
000600 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000000
000620 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
000640 00000000 003C0048 D8E2E2E3 00000035 00000006 00000002 0000009E 0000002B
000660 00000078 00000042 00000048 000000EE 0000001B 0000007B 0000004B 00000000
000680 00000000 00000000 00000000 0093004C D8D1E2E3 00000000 000000FC 0000000E
0006A0 00000000 00000000 0000009D 00000000 00000000 00000016 0000000F 00000018
G
0006C0 00000000 00000000 00000000 00000000 00000000 00000000 004C011A 00010Dxx
0006E0 02523038 E2E2D6D7 0093018F 11223324 00000042 0000001A 00000001 E2C1D5E3
000700 C16DE3C5 D9C5E2C1 6DD3C1C2 40404040 40404040 40404040 40404040 A6E9B6B4
000720 9A2B0001 H
| Key to Figure 2 | Description |
|---|---|
| A 0724 | Length of assembled record; beginning of GTF writer header section of second record (field QWGTLEN) |
| B EFB9 | GTF event ID (field QWGTEID) |
| C | End of GTF writer header section of second record |
| D 000006D8 | Offset to product section |
| E 00000090 | Offset to first data section |
| F 000004C4 | Offset to last data section |
| G 004C011A | Beginning of product section |
| H | End of second record |