LOCATION returns a FIXED BIN value that specifies the byte location of x within the level-1 structure or union that has member x.
>>-LOCATION(x)-------------------------------------------------><
Abbreviation: LOC
The value for x must not be subscripted.
Under the CMPAT(V3) compiler option, LOCATION returns a FIXED BIN(63) value. Under all other CMPAT options, it returns a FIXED BIN(31) value.
dcl 1 Table static,
2 Tab2loc fixed bin(15) nonasgn init(loc(Tab2)),
/* location is 0; gets initialized to 8 */
2 Tab3loc fixed bin(15) nonasgn init(loc(Tab3)),
/* location is 2; gets initialized to 808 */
2 Length fixed bin nonasgn init(loc(End)),
/* location is 4 */
2 * fixed bin,
2 Tab2(20,20) fixed bin,
/* location is 8 */
2 Tab3(20,20) fixed bin,
/* location is 808 */
2 F2_loc fixed bin nonasgn init(loc(F2)),
/* location is 1608; gets initialized to 1612 */
2 F2_bitloc fixed bin nonasgn init(bitloc(F2)),
/* location is 1610; gets initialized to 1 */
2 Flags, /* location is 1612 */
3 F1 bit(1),
3 F2 bit(1), /* bitlocation is 1 */
3 F3 bit(1),
2 Bits(16) bit, /* location is 1613 */
2 End char(0);