RPG directives are handled by the SQL precompiler according to
the value of the RPG preprocessor options parameter (RPGPPOPT). If the RPG
preprocessor is used, the SQL precompile will run using the expanded preprocessed
source.
- When the value is *NONE, the RPG preprocessor is not called to preprocess
the RPG source. The only directive handled by the SQL precompiler is /COPY.
Nested /COPY statements will not be handled. All other directives will be
ignored until the RPG compiler is called. This means that all RPG and SQL
statements within conditional logic blocks will be processed unconditionally
by the SQL precompiler.
- When the value is *LVL1, the RPG preprocessor will be called to preprocess
the RPG source. All /COPY statements are expanded, even nested
/COPY statements, and the conditional compilation directives will be handled.
- When the value is *LVL2, the RPG preprocessor will be called to preprocess
the RPG source. All /COPY and /INCLUDE statements are expanded and the conditional
compilation directives will be handled.
- When *LVL1 or *LVL2 is used, there is a possibility that the expanded
source generated by the RPG preprocessor will become very large and reach
a resource limit due to the expansion of the /COPY and /INCLUDE statements.
If this happens you must either break up your source into smaller pieces,
or not use the RPG preprocessor.