OPTIMIZE

This directive optimizes the code generated by the precompiler specifically for use on either PC or mainframe.
Restriction: This topic applies to Windows environments only.

Syntax:

OPTIMIZE= run-time-environment

Parameters:

run-time-environment Specify OPTIMIZE=MAINFRAME if your program uses COMP as data type for most numeric fields including fields described in SQLCA and SQLDA copybooks.

Specify OPTIMIZE=PC if your program uses COMP-5 as data type for most numeric fields including fields described in SQLCA and SQLDA copybooks.

Properties:

Default: OPTIMIZE=MAINFRAME

Comments:

The precompiler will generate code to swap bytes for all numeric host variables that don't match the optimize setting except for variables defined in an SQLDA. Variables defined in the SQLDA must match the optimize setting or an error message is generated. Obviously, if you intermix defining numeric variables using a mix of COMP/COMP-5 fields, more code is generated by the precompiler to handle this which also affects portability and performance.