Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Preprocessor Facilities

Preprocessor Options
Preprocessor Scan
Preprocessor Statements
Preprocessor Variables and Data Elements
Preprocessor References and Expressions
Scope of Preprocessor Names
Preprocessor Procedures
Arguments and Parameters for Preprocessor Procedures
%PROCEDURE Statement
Preprocessor RETURN Statement
Preprocessor ANSWER Statement
Preprocessor Built-In Functions
COLLATE
COMMENT
COMPILEDATE
COMPILETIME
COPY
COUNTER
DIMENSION
HBOUND
INDEX
LBOUND
LENGTH
LOWERCASE
MACCOL
MACLMAR
MACNAME
MACRMAR
MAX
MIN
PARMSET
QUOTE
REPEAT
SUBSTR
SYSPARM
SYSTEM
SYSVERSION
TRANSLATE
TRIM
UPPERCASE
VERIFY
Preprocessor Statements
%ACTIVATE Statement
%assignment Statement
%DEACTIVATE Statement
%DECLARE Statement
%DO Statement
%END Statement
%GO TO Statement
%IF Statement
%INCLUDE Statement
%INSCAN Statement
%ITERATE Statement
%LEAVE Statement
%NOTE Statement
%null Statement
%REPLACE Statement
%SELECT Statement
%XINCLUDE Statement
%XINSCAN Statement
Preprocessor Examples
Example 1

The compiler provides a MACRO preprocessor for source program alteration. It is executed prior to compilation, when you specify the MACRO or PP(MACRO) compile-time option. The MACRO preprocessor scans the preprocessor input and generates preprocessor output. The preprocessor output can serve as input to the compiler.

This description of the preprocessor assumes that you know the PL/I language described throughout this publication.

The Preprocessor input is a string of characters. consisting of intermixed:

Preprocessor output 2 is a string of characters consisting of intermixed:

You can specify compile-time options that cause the preprocessor input to be printed or the preprocessor output or both to be printed or to be written to a data set.


1.
For clarity in this discussion, preprocessor statements are shown with the % symbol (even though, when used in a preprocessor procedure, such a statement would not have a % symbol).
2.
Preprocessor replacement output is shown in a formatted style, while actual execution-generated replacement output is unformatted.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)