You use identifiers, delimiters, operators, and constants to construct PL/I statements.
Although your source program consists of a series of records or lines, PL/I views the program as a continuous stream of characters. There are few restrictions in the format of PL/I statements, and programs can be written without considering special coding rules or checking to see that each statement begins in a specific column. A statement can begin in the next position after the previous statement, or it can be separated by any number of blanks.
Some statements begin with a % symbol. These statements are either %directives that direct preprocessor and compiler operations (controlling listings, including program source text from a library, and so on) or are PL/I macro facility %statements. A %directive must be on a line by itself.
To improve program readability and maintainability and to avoid unexpected results caused by loss of trailing blanks in source lines:
The PL/I statements, macro facility %statements, and the %directives are alphabetically listed in Statements and directives.
Syntax for a PL/I statement:
|
Syntax for a %directive:
|
Syntax for a %statement:
|
Syntax for a macro statement:
|
Every statement must be contained within some enclosing group or block. Macro statements must be contained within some enclosing macro group or procedure.
Any statement, except DECLARE, DEFAULT, WHEN, OTHERWISE, and ON statements, can have a label prefix. Use the following syntax for a label prefix.
|
The syntax for individual statements throughout this book generally does not show the condition prefix or the label prefix.