Control statements in source
You can control precompilation by placing control statements in source files. The $SET statement is used to set constants and directives. Other control statements provide support for conditional compilation and message output.
Directives
You can set directives in source code using a $SET control statement thus
$SET directiveSetting
Constants
You can set a constant in source code using a $SET CONSTANT control statement.
The following formats are compatible with both standalone and integrated precompilation:
$SET CONSTANT constantName [=] constantValue
$SET CONSTANT constantName [=] “constantValue”
CitOESQL also supports the following formats:
$SET CONSTANT(constantName [=] constantValue)
$SET CONSTANT(constantName [=] “constantValue”)
$SET CONSTANT(constantName [=] ‘constantValue’)
To set a constant in a directives file or on the CitOESQL command line use the following formats:
[-][-]CONSTANT(constantName [=] constantValue)
[-][-]CONSTANT(constantName [=] “constantValue”)
[-][-]CONSTANT(constantName [=] ‘constantValue’)
Conditional compilation
CitOESQL supports conditional compilation using $IF, $ELSE and $END statements in standalone mode. These are compatible with the conditional compilation support offered by cobc.
CitOESQL also support the following variant, which is not supported by cobc:
$IF constantName [NOT] DEFINED
Messages
In standalone mode you can output a message at compile time using a $DISPLAY statement. The message displayed starts with the first non-blank character following $DISPLAY and ends with the last non-blank character on the same line.