CMPAT

The CMPAT option specifies whether object compatibility with OS PL/I Version 1, OS PL/I Version 2, PL/I for MVS™ & VM, or Enterprise PL/I for z/OS® is to be maintained for programs sharing strings, AREAs, arrays, or structures.

Note: Under the LP(64) option, the CMPAT option is ignored; effectively, CMPAT(V3) is always on.
Read syntax diagramSkip visual syntax diagram
             .-V2-.      
>>-CMPAT--(--+-LE-+--)-----------------------------------------><
             +-V1-+      
             '-V3-'      

ABBREVIATIONS: CMP

Start of changeLEEnd of change
Start of changeUnder CMPAT(LE), your program can share strings, AREAs, arrays, or structures only with programs compiled with VisualAge PL/I for OS/390 or Enterprise PL/I for z/OS and only as long as the CMPAT(V1) and CMPAT(V2) options were not used when they were compiled. DB2 stored procedures must not be compiled with CMPAT(LE).End of change
Start of changeV1End of change
Start of changeUnder CMPAT(V1), you can share strings, AREAs, arrays, or structures with programs compiled with the OS PL/I compiler and with programs compiled with later PL/I compilers as long as the CMPAT(V1) option was used. The JSON built-in functions are not supported under CMPAT(V1).End of change
V2
Under CMPAT(V2), you can share strings, AREAs, arrays, or structures with programs compiled with the OS PL/I compiler and with programs compiled with later PL/I compilers as long as the CMPAT(V2) option was used.
V3
Under CMPAT(V3), you can share strings with programs compiled with the OS PL/I compiler and with programs compiled with later PL/I compilers as long as one of the CMPAT(V*) options was used. However, you cannot share AREAs, arrays, or structures with any code that was not compiled with CMPAT(V3).

All the modules in an application must be compiled with the same CMPAT option.

Mixing old and new code still has some restrictions. For information about these restrictions, see the Enterprise PL/I for z/OS Compiler and Run-Time Migration Guide.

The DFT(DESCLIST) option conflicts with the CMPAT(V*) options. If it is specified with any CMPAT(V*) option, a message will be issued and the DFT(DESCLOCATOR) option will be assumed.

Start of changeUnder CMPAT(V3), arrays can be declared with any value that an 8-byte integer can assume. However, unless the LP(64) option is used, the total size of an array currently still has the same limit as an array declared under CMPAT(V2).End of change

Under CMPAT(V3), the following built-in functions will always return a FIXED BIN(63) result:

Because these functions will return 8-byte integer values, under CMPAT(V3), the second option in the FIXEDBIN suboption of the LIMITS option must be 63.

However, even under CMPAT(V3), statement and format label constants must be specified using 4-byte integers.