Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

How to read the syntax diagrams

The following rules apply to the syntax diagrams used in this book:

Arrow symbols
Read the syntax diagrams from left to right, from top to bottom, following the path of the line.
>>---
Indicates the beginning of a statement.
--->
Indicates that the statement syntax is continued on the next line.
>---
Indicates that a statement is continued from the previous line.
---><
Indicates the end of a statement.
Diagrams of syntactical units other than complete statements start with the >--- symbol and end with the ---> symbol.

Diagrams of syntactical units other than complete statements start with the >--- symbol and end with the --->

Conventions
Required items
Required items appear on the horizontal line (the main path).
Read syntax diagramSkip visual syntax diagram>>-REQUIRED_ITEM-----------------------------------------------><
 
Optional Items
Optional items appear below the main path.
Read syntax diagramSkip visual syntax diagram>>-REQUIRED_ITEM--+---------------+----------------------------><
                  '-optional_item-'
 

If an optional item appears above the main path, that item has no effect on the execution of the statement and is used only for readability.

Read syntax diagramSkip visual syntax diagram                  .-optional_item-.
>>-REQUIRED_ITEM--+---------------+----------------------------><
 
Multiple required or optional items
If you can choose from two or more items, they appear vertically in a stack. If you must choose one of the items, one item of the stack appears on the main path.
Read syntax diagramSkip visual syntax diagram>>-REQUIRED_ITEM--+-required_choice1-+-------------------------><
                  '-required_choice2-'
 

If choosing one of the items is optional, the entire stack appears below the main path.

Read syntax diagramSkip visual syntax diagram>>-REQUIRED_ITEM--+------------------+-------------------------><
                  +-optional_choice1-+
                  '-optional_choice2-'
 
Repeatable items
An arrow returning to the left above the main line indicates that an item can be repeated.
Read syntax diagramSkip visual syntax diagram                  .-----------------.
                  V                 |
>>-REQUIRED_ITEM----repeatable_item-+--------------------------><
 

If the repeat arrow contains a comma, you must separate repeated items with a comma.

Read syntax diagramSkip visual syntax diagram                  .-,---------------.
                  V                 |
>>-REQUIRED_ITEM----repeatable_item-+--------------------------><
 

A repeat arrow above a stack indicates that you can specify more than one of the choices in the stack.

Default keywords
Default keywords appear above the main path, and the remaining choices are shown below the main path.
Read syntax diagramSkip visual syntax diagram                  .-default_choice--.
>>-REQUIRED_ITEM--+-----------------+--------------------------><
                  +-optional_choice-+
                  '-optional_choice-'
 
Fragments
Sometimes a diagram must be split into fragments. The fragments are represented by a letter or fragment name, set off like this: | A |. The fragment follows the end of the main diagram. The following example shows the use of a fragment.
Read syntax diagramSkip visual syntax diagram>>-STATEMENT--item 1--item 2--| A |----------------------------><
 
A:
 
|--+-item 3-+--KEYWORD--+-+--------+-+--------------------------|
   '-item 4-'           | '-item 5-' |
                        '-+--------+-'
                          '-item 6-'
 
Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide