PP

The PP option specifies which (and in what order) preprocessors are invoked before compilation.

Read syntax diagramSkip visual syntax diagram
   .-NOPP---------------------------------------.   
   |        .-+---+------------------------.    |   
   |        | '-,-'                        |    |   
   |        V                              |    |   
>>-+-PP--(----pp-name--+-----------------+-+--)-+--------------><
                       '-(--pp-string--)-'          

pp-name
The name given to a particular preprocessor. CICS®, INCLUDE, MACRO and SQL are the only preprocessors currently supported. Using an undefined name causes a diagnostic error.
pp-string
A string, delimited by quotation marks, of up to 100 characters representing the options for the corresponding preprocessor. For example, PP(MACRO('CASE(ASIS)')) invokes the MACRO preprocessor with the option CASE(ASIS).

Preprocessor options are processed from left to right, and if two options conflict, the last (rightmost) option is used. For example, if you invoke the MACRO preprocessor with the option string 'CASE(ASIS) CASE(UPPER)', then the option CASE(UPPER) is used.

You can specify a maximum of 31 preprocessor steps, and you can specify the same preprocessor more than once with the exception of the CICS and SQL preprocessors. The CICS preprocessor must be invoked at most once, and the SQL preprocessor must be invoked no more than twice. The SQL preprocessors can be invoked twice only if the first specification specifies INCONLY as its option.

If the MACRO option is specified along with the PP option, the MACRO preprocessor will be added to the beginning of the list of preprocessors in the PP option unless it is already the first in that list. So, specifying MACRO and PP(SQL MACRO) will cause the PP option to become PP(MACRO SQL MACRO), and the MACRO preprocessor will be invoked twice. However, specifying MACRO and PP(MACRO SQL) will leave the PP option unchanged, and the MACRO preprocessor will be invoked only once. However, the use of both the MACRO option and the PP(MACRO) option in the same compilation is not recommended.

If you specify the PP option more than once, the compiler effectively concatenates them. So specifying PP(SQL) PP(CICS) is the same as specifying PP(SQL CICS). This also means that if you specifies PP(MACRO SQL('CCSID0')) and PP(MACRO SQL('CCSID0 DATE(ISO)')), the resulting PP option is PP( MACRO SQL('CCSID0') MACRO SQL('CCSID0 DATE(ISO)')), and both the MACRO preprocessor and the SQL preprocessor will be invoked twice, and the second invocation of the SQL preprocessor will be in error. If you do this to override the earlier SQL options, it might be better not to specify the preprocessor options in the PP option, but rather to specify them through the PPSQL option, that is, specify PP(MACRO SQL) PPSQL('CCSID0 DATE(ISO)').