Start of change

Predefined compilation variables

There are compilation variables that are defined automatically by the compiler. These compilation variables listed in this topic can be referenced in conditional compilation directives wherever a compilation variable is allowed.

Table 1. Predefined compilation variables
Predefined compilation variable name Description Value
ARCH Indicates the target architecture for which the source code is being compiled. The value of the ARCH option that was used to compile the program: 7, 8, 9, 10, 11 or 12.
CICS® Indicates whether embedded CICS statements are accepted. B'1' if the CICS compiler option is in effect; B'0' otherwise.
COMPILER-VRM Indicates the version of the compiler. An integer in the format Start of changeVVRRMMEnd of change, where:
  • VV represents the version number.
  • RR represents the release number.
  • Start of changeMMEnd of change represents the modification number.

Start of changeFor example, compiler version 6.2.0 has a COMPILER-VRM value of 060200.End of change

DLL Indicates whether the program is compiled as DLL code. B'1' if the DLL compiler option is in effect; B'0' otherwise.
DYNAM Indicates whether programs invoked through the CALL literal statement will be loaded or deleted dynamically at run time. B'1' if the DYNAM compiler option is in effect; B'0' otherwise.
OPTIMIZE Indicates the optimization level. The optimization level that was used to compile the program: 0, 1 or 2.
SQL Indicates whether processing of embedded SQL statements is enabled. B'1' if the SQL compiler option is in effect; B'0' otherwise.
SQLIMS Indicates whether processing of embedded SQLIMS statements is enabled. B'1' if the SQLIMS compiler option is in effect; B'0' otherwise.
THREAD Indicates whether the program is compiled with multithread support enabled. B'1' if the THREAD compiler option is in effect; B'0' otherwise.

related references  
DEFINE  
DEFINE (Enterprise COBOL Programming Guide)

End of change