Compiling Expressions


Compiling expressions into machine code provides faster processing.

Compiling Expressions Using the DEFINES Parameter


The SET DEFINES, SET COMPUTE, and SET MODCOMPUTE commands have been deprecated. Expressions are compiled unless environmental conditions prevent compilation.

Among the benefits of the compiling expressions are:

  • Compilation of only those expressions that are actually used in the TABLE request.
  • Much faster execution of expressions containing complex calculations on long packed fields.
  • Compilation of date expressions.

Reference: Usage Notes for Compiled Expressions

  • Any expression that cannot be compiled runs without compilation. This does not affect compilation of other expressions. The following elements in an expression disable compilation:
    • Functions. However, expressions that use the following functions can be compiled: YMD, DMY, INT, and DECODE.

If compilation is not possible because of environmental conditions, the processing is handled without compilation. No message is generated indicating that compilation did not take place. To determine whether it did take place, issue the ? COMPILE command.