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

Preprocessor Variables and Data Elements

A preprocessor variable is specified in a %DECLARE statement with either the FIXED or the CHARACTER attribute. No other attributes can be declared for a preprocessor variable, and attributes must not be repeated. (Other attributes are supplied by the preprocessor, however.) All variables have storage equivalent to the STATIC storage class.

While it is not required that you specify the FIXED or CHARACTER attribute for each variable in a %DECLARE, it is always the best practice to do so.

Preprocessor data types are coded arithmetic and string data, and are either:

FIXED
A preprocessor variable declared with the FIXED attribute is, by default, given the attributes DECIMAL(5,0).

If the FIXED(BINARY) macro preprocessor option is in effect, then it is given the attributes BINARY(31,0).

In either case, it is given an initial value of 0.

Fractional values are not supported.

CHARACTER
A preprocessor variable declared with the CHARACTER attribute is given the VARYING attribute.

It is given an initial value of ''.

BIT
There are no preprocessor bit variables. However, bit constants are allowed, and bit values result from comparison operators, the concatenation operator (when used with bit operands), the not operator, and the PARMSET built-in function. The preprocessor-expression in the %IF statement converts to a bit value.

The only numeric constants supported by the preprocessor are optionally signed, unscaled integers (such as 17 or -29).

The only string constants supported by the preprocessor are character and bit strings, either of which may be specified using hexadecimal notation (i.e. as X or BX strings).

String repetition factors are not allowed. However, the COPY built-in function may be used to replicate a constant.


Terms of use | Feedback

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