IBM Enterprise PL/I
Statements:
%ACTIVATE
ANSWER
The preprocessor ANSWER statement can be used only in a preprocessor
procedure that does not have the RETURNS attribute.
The ANSWER statement produces text and/or invokes other preprocessor
procedures. The answered text replaces the invocation of the preprocessor
procedure in the source text. You can use any number of ANSWER statements in a
preprocessor procedure.
%assignment
%DEACTIVATE
%DECLARE
ENTRY
BUILTIN
CHARACTER
FIXED
Allows up to 15 dimensions.
EXTERNAL and INTERNAL attributes are meaningless.
%DO
Type-1, -2, and -3 DO statements supported with restrictions.
V4R1 adds %DO SKIP; ... %END; that skips all text between DO and END.
%END
Multiple closure allowed.
%GOTO
%IF %THEN %ELSE
%INCLUDE
%INSCAN
Like %INCLUDE except that the name of the file to be included is specified
by a preprocessor variable.
%ITERATE
The %ITERATE statement transfers control to the %END statement that delimits its
containing iterative DO-group. The current iteration completes and the next
iteration, if needed, is started.
%LEAVE
%NOTE
The %NOTE statement generates a preprocessor diagnostic message of specified
text and severity.
%null
%PROCEDURE
%REPLACE
RETURN
%SELECT
%XINCLUDE
The %XINCLUDE statement is the same as the %INCLUDE statement except that
the file is not included if it already has been.
%XINSCAN
The %XINSCAN statement is the same as the %INSCAN statement except that the
file is not included if it already has been.
Builtins:
COLLATE
Returns a CHARACTER string of length 256 comprising the 256 possible character values one time each in the collating order.
COMMENT
Converts a CHARACTER expression into a comment by enclosing it in /* and */.
If the expression contains /* or */ composite symbols, they are replaced by /> and </, respectively.
COMPILEDATE
Returns a CHARACTER string of length 17 containing the date and the time of the compilation
as YYYYMMDDHHMMSSTTT.
COMPILETIME
Returns a CHARACTER string of length 18 containing the date and the time of compilation.
as DD.MMM.YYbHH.MM.SS (b represents a blank, MMM is month abbrev as JEN, FEB, etc.)
COPY
COPY(x,y) returns a CHARACTER string consisting of y concatenated copies of the string x.
COUNTER
Returns a CHARACTER string of length 5 containing a decimal number. The returned number is 00001 for the first invocation, and is incremented by one on each successive invocation.
DIMENSION(x[,y])
Returns a FIXED value specifying current extent of dimension y of x.
HBOUND(x[,y])
Returns a FIXED value specifying current upper bound of dimension y of x.
INDEX(x,y[,n])
Returns a FIXED value indicating the starting position within x of a substring identical to y. You can also specify the location n within x where processing begins.
LBOUND(x[,y])
Returns a FIXED value specifying current lower bound of dimension y of x.
LENGTH
Returns a FIXED value specifying the current length of a given character expression.
LOWERCASE
Returns a CHAR string with all the alphabetic characters from A to Z converted to their lowercase equivalent.
MACCOL
Returns a FIXED value that represents the column where the outermost macro invocation starts in the source text that contains the macro invocation.
MACLMAR
Returns a FIXED value that represents the column number of the left source margin in MARGINS compiler option.
MACNAME
Returns the name of the preprocessor procedure within which it is invoked. (V3R5 and greater)
MACRMAR
Returns a FIXED value that represents the column number of the right source margin in MARGINS compiler option.
MAX
Returns the largest value from a set of two or more expressions.
MIN
Returns the smallest value from a set of two or more expressions.
PARMSET(n)
Returns a BIT value indicating if a specified parameter n was set on invocation of the procedure.
QUOTE(x)
Returns a CHARACTER string that represents x as a valid quoted string.
If x contains single quotation marks, each is replaced by two consecutive single quotation marks.
REPEAT(x,y)
Returns a CHARACTER string consisting of (y + 1) concatenated copies of the string x.
SUBSTR(x,y[,z])
Returns a substring, specified by y and z, of x.
SYSPARM
Returns the CHARACTER string value of the SYSPARM compiler option.
SYSTEM
Returns a CHARACTER string that contains the value of the SYSTEM compiler option that is in effect.
SYSVERSION
Returns a CHARACTER string containing the product name as well as the version, release, and modification level.
TRANSLATE(x,y[,z)
Returns a CHARACTER string of the same length as x, but with selected characters translated.
TRIM
Returns a CHARACTER string with characters trimmed from one or both ends of an input string. (V3R5 and greater)
UPPERCASE
Returns a CHARACTER string with all the alphabetic characters from a to z converted to their uppercase equivalent. (V3R5 and greater)
VERIFY(x,y[,n])
Returns a FIXED value indicating the position in x of the leftmost character that is not in y. It also allows you to specify the location within x at which to begin processing.