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

Statements

Simple statements
Compound statements

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:

Read syntax diagramSkip visual syntax diagram>>-+------------------+--+--------------+--+-----------+-------><
   '-condition-prefix-'  '-label-prefix-'  '-statement-'
 

Syntax for a %directive:

Read syntax diagramSkip visual syntax diagram>>-%--+-----------+--------------------------------------------><
      '-statement-'
 

Syntax for a %statement:

Read syntax diagramSkip visual syntax diagram      .------------------.
      V                  |
>>-%----+--------------+-+--+-----------+----------------------><
        '-label-prefix-'    '-statement-'
 

Syntax for a macro statement:

Read syntax diagramSkip visual syntax diagram   .------------------.
   V                  |
>>---+--------------+-+--+-----------+-------------------------><
     '-label-prefix-'    '-statement-'
 

Every statement must be contained within some enclosing group or block. Macro statements must be contained within some enclosing macro group or procedure.

condition-prefix
A condition prefix specifies the enabling or disabling of a PL/I condition (see Condition handling).
label-prefix
A label prefix is one or more statement labels. It identifies a statement so that it can be referred to at some other point in the program. Statement labels are either label constants (discussed in Label data and LABEL attribute), entry constants (discussed in Entry data), or format constants (discussed in Format data and FORMAT attribute).

Any statement, except DECLARE, DEFAULT, WHEN, OTHERWISE, and ON statements, can have a label prefix. Use the following syntax for a label prefix.

Read syntax diagramSkip visual syntax diagram   .---------------.
   V               |
>>---identifier--:-+-------------------------------------------><
 

The syntax for individual statements throughout this book generally does not show the condition prefix or the label prefix.

statement
A simple or a compound statement.

Terms of use | Feedback

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