The MAP statement defines a named area of statically allocated storage called a PSECT, declares data fields in the record, and associates them with program variables. Example MAP (BUF1) STRING FILL=18, LONG A(10 TO 20)
1 – Syntax
MAP (map-name) { [ data-type ] map-item },... map-item: { num-unsubs-var-name } { num-array-name ([int-const1 TO] int-const2,...) } { str-unsubs-var-name [=int-const] } { str-array-name ([int-const1 TO] int-const2,...)[=int-const] } { FILL [ (int-const) ] [=int-const] } { FILL% [ (int-const) ] } { FILL$ [ (int-const) ] [=int-const] }
2 – DYNAMIC
The MAP DYNAMIC statement names the variables and arrays whose size and position in a storage area can change at run-time. The MAP DYNAMIC statement is used in conjunction with the REMAP statement. The REMAP statement defines or redefines the position in the storage area of variables named in the MAP DYNAMIC statement. Example MAP (ABC) STRING DUMMY = 512 MAP DYNAMIC (ABC) STRING A, B, C, LONG D, E, F
2.1 – Syntax
MAP DYNAMIC (map-dyn-name) { [ data-type ] map-item },... map-dyn-name: { map-name } { static-str-var } map-item: { num-unsubs-var-name } { num-array-name ([int-const1 TO] int-const2,...) } { str-unsubs-var-name } { str-array-name ([int-const1 TO] int-const2,...) }