LP

The LP compiler option affects whether a AMODE 31 (31-bit) or AMODE 64 (64-bit) program should be generated with the related language features enabled when compiling COBOL programs.

Syntax

Read syntax diagramSkip visual syntax diagramLP=3264

You can specify the LP option in the ways that you specify other compiler options. However, if you specify the option in a CBL (PROCESS) statement, you can only specify the LP option for the first program. You cannot change the value of the option for subsequent programs in the batch.

Default
LP=32
32
Indicates that an AMODE 31 (31-bit) program should be generated with the related language features enabled.
64
Indicates that an AMODE 64 (64-bit) program should be generated with the related language features enabled.

Runtime consideration: With current service applied, Language Environment® supports mixing AMODE 64 and AMODE 31 programs in the same application. However, only dynamic call supports calling a subprogram with different AMODE from the caller, and you need to specify the COBOL runtime option AMODE3164 when running mixed AMODE COBOL programs. For static CALLs, the binder will issue a message if it encounters mixing addressing modes during external name resolution. For details, see Dynamic call between AMODE 31 and AMODE 64 programs.

When using the LP=64 compiler option, the compilation process includes a component that runs in POSIX(ON) mode. This implies that there must be an OMVS Segment established in RACF® (or equivalent in RACF alternatives) for each user executing the compiler with this option.

Restrictions for programs using LP=64: Programs compiled using the LP=64 compiler option cannot contain XML GENERATE or XML PARSE statements, JSON GENERATE or JSON PARSE statements, Object-oriented COBOL statements, ALTER statements, GO TO. statements, and DISPLAY ... UPON SYSPUNCH statements. In addition, AMODE 64 programs cannot run in CICS® or IMS.
Note: Under LP(64), some compiler options are not applicable. For more information, see Using compiler options to compile AMODE 64 programs.