Makes the Compiler take the source program from a preprocessor instead of a source file.


   +-/-+ |    +-P----------+       +-preproc-params-++-ENDP-+|


The preprocessor to use.
Parameters to be passed directly to the preprocessor.


Phase: Syntax check
$SET: On very first source line only


This directive informs the Compiler that an integrated preprocessor is to be used.

A $SET statement is processed by both the Compiler and the preprocessor. Furthermore, if the PREPROCESS directive is set in a $SET statement, the directive only takes effect after the entire $SET statement has been processed. If the $SET statement contains other directives there might be incompatibilities when the preprocessor parses the source a second time. In particular, the SOURCEFORMAT directive might cause the Compiler to interpret the source as fixed format while the preprocessor might view it as free format, or vice-versa. If you specify the PREPROCESS Compiler directive in a $SET statement, you should, therefore, ensure that the $SET statement only contains the PREPROCESS directive. If you want to set other directives, use separate $SET statements on following lines.

You are advised to use the ENDP COBOL directive to terminate the directives to pass to the preprocessor. Directives placed after ENDP pass to the COBOL Compiler. Therefore, without the ENDP directive, Compiler directives might continue to pass to the preprocessor rather than to the COBOL compiler.

If you are sending directives to the COBSQL preprocessor, use END-C to distinguish the directives to pass to COBSQL and the directives to pass to the precompiler. For example, in the command line below directives placed before END-C pass to COBSQL while directives placed between END-C and ENDP pass via COBSQL to the precompiler:

preprocess(cobsql) cobsqltype=oracle end-c comp5=yes endp;