O command code
You can use the O command code to specify a SSA qualification with the position and length of the target data instead of a DBD-defined field name.
This command code is valid for full function database types (HDAM, HIDAM, PHIDAM, and PHDAM) and Fast Path DEDBs.
- GU SSA
- GHU SSA
- GN SSA
- GNP SSA
- GHNP SSA
- ISRT SSA
When command code O is specified, the SSA qualification can contain either normal field names or the starting position and length of the data that you want to retrieve.
You must specify the position and length as two 4-byte binary values in place of the usual 8-byte character value that is used to specify a field name. The starting position is 1 and the position is relative to the physical start of the segment definition. The maximum length that is supported is the maximum segment size for the database type. The minimum length is 1.
Field Position Length
Labname 1 5
Street 10 20
State 30 2
Field Position Length
Labname 1 5
Type 6 3
Street 10 20
State 30 2
I 11111111122222222233
I 12345678901234567901235678901
___________I _____________________________
Segment #1 I SVL DEV 555 BAILEY AVE CA
Segment #2 I ARC RSC 650 HARRY RD CA
___________I _____________________________
00000000
GU IBMLABS *O(00010005= SVL )
00000000
GU IBMLABS *O(00010005= ARC )
00010000
GU IBMLABS *O(000E0002= CA)
00000000
GU IBMLABS *O(00060003= DEV)In the first and second GU calls, the
position is 1 and the length of the target data is 5. In the third GU call, the
position is 30 (x'1E') and the length of the target data is 2. In the fourth GU
call, the position is 6 and the length of the target data is 3.