Use the ADDR compiler option to indicate whether a 32-bit or 64-bit object program should be generated.
Default is: ADDR(32)
Abbreviations are: None
Option specification:
If you specify compiler options using the -q option of the cob2 command (or its variants cob2_j or cob2_r), you can abbreviate ADDR(32) as 32 or ADDR(64) as 64. For example:
cob2 -q64 prog64.cbl
Storage allocation:
The storage allocation for the following COBOL data types depends on the setting of the ADDR compiler option:
If ADDR(32) is in effect, 4 bytes are allocated for each item in your program that has one of the usages listed above; if ADDR(64) is in effect, 8 bytes are allocated for each of the items.
If the SYNCHRONIZED clause is specified for a data item that has one of the usages shown above, the item is aligned on a fullword boundary if ADDR(32) is in effect, or on a doubleword boundary if ADDR(64) is in effect.
The setting of the ADDR option affects several compiler limits. For details, see the related reference about compiler limits.
LENGTH OF special register:
PICTURE 9(9) USAGE IS BINARY
PICTURE 9(18) USAGE IS BINARY
LENGTH intrinsic function:
If ADDR(32) is in effect, the returned value of the LENGTH intrinsic function is a 9-digit integer. If ADDR(64) is in effect, the returned value is an 18-digit integer.
related concepts
JDK support
related tasks
Finding the length of data items
Compiling programs
Coding COBOL programs to run under CICS
Calling between COBOL and C/C++ programs
related references
cob2, cob2_j, and cob2_r options
Conflicting compiler options
Migration of 32-bit applications to 64-bit mode
Compiler limits (COBOL for AIX Language Reference)