Prerequisites for Compilation
To be compiled, an application program must meet the following requirements:
- The program can not include commands that assign values to macros such as
- The program cannot call local macros (i.e., <0> to <9>).
- The program can call global macros (i.e.,
), but the compiled version uses the value of the macro as it existed at compile time. Later changes in the value of the macro have no effect on the compiled code.
- The program cannot include object manipulation commands (commands that define, create, or erase objects). Application objects must be defined outside of compiled programs.
Note: The CREATE INDEX and ERASE INDEX commands can be compiled.
- The program cannot include the commands COMPILE, PARSE, and GENERATE (the Compiler ignores these commands).
- The program cannot include the ACCESS and RELEASE commands (the Compiler ignores these commands).
- Care must be exercised if the program uses temporary result sets. Anomalies can occur when commands that produce temporary result sets are compiled (see The Correct Use of Objects in a Compiled Program, for more information).
You should thoroughly test and debug all programs belonging to an application before compiling them.
Furthermore, before you compile an application program, you can also use the PARSE command to assist you ensuring that the program is syntactically correct.