Handling of Directives by the RPG Preprocessor

The handling of compiler directives by the RPG preprocessor depends on the options specified on the PPGENOPT parameter on the compile command. There are several actions the preprocessor can take on a particular directive:

In general, with option *RMVCOMMENT, only the directives neccessary for successful compilation are output to the generated source file. With option NORMVCOMMENT, the directives not necessary for successful compilation of the generated source file are converted into comments.

The following table summarizes how each directive is handled by the preprocessor for the various PPGENOPT parameter values:

Directive *RMVCOMMENT *NORMVCOMMENT
*EXPINCLUDE *NOEXPINCLUDE *EXPINCLUDE *NOEXPINCLUDE
/COPY remove remove comment comment
/DEFINE remove keep comment keep
/EJECT remove remove keep keep
/ELSE remove remove comment comment
/ELSEIF remove remove comment comment
/END-EXEC keep keep keep keep
/END-FREE keep keep keep keep
/ENDIF remove remove comment comment
/EOF remove remove comment comment
/EXEC keep keep keep keep
/FREE keep keep keep keep
/IF remove remove comment comment
/INCLUDE remove keep comment keep
/SPACE remove remove keep keep
/TITLE remove remove keep keep
/UNDEFINE remove keep comment keep


[ Top of Page | Previous Page | Next Page | Contents | Index ]