DATA

The DATA directive is supported when the compiler option LP(64) is in effect. It specifies the storage location of identifiers in WORKING-STORAGE section following the directive, and applies to level 01 and 77 data items. The storage location specified stays in effect until another DATA directive is encountered in the source. The directive must not be placed in the middle of a group data item. The directive also applies to external data items.

Format

Read syntax diagramSkip visual syntax diagram>>DATA integer-1
integer-1
Must be an unsigned integer with a value of 64 or 31. The default for LP(64) is 64. The directive is not supported in LP(32).

Location of data items in WORKING-STORAGE Section

Data items in WORKING-STORAGE, which is also called storage location or data location, can reside above the bar, or below the bar, which informally are referred as 64-bit data items, and 31-bit data items respectively. This applies to programs compiled with the LP(64) option. By default, data items in WORKING-STORAGE are allocated above the bar when the LP(64) compiler option is in effect. The DATA compiler directive can be used to change this default to a different storage location.
Note: All subordinate items belonging to the same group item must be allocated in the same storage location.

>>DATA 31 specifies that storage should reside below the 2GB bar, accessible by AMODE 31 or AMODE 64 programs.

>>DATA 64 specifies that storage could reside above the 2GB bar, accessible by AMODE 64 programs only.

Related topics    
Dynamic call between AMODE 31 and AMODE 64 programs (Enterprise COBOL Programming Guide)
WORKING-STORAGE SECTION