Throughout this book, syntax is described using the structure defined below.
Diagrams of syntactical units other than statements, such as clauses, phrases and paragraphs, also start with the >>--- symbol and end with the --->< symbol.
>>-STATEMENT--required item--+---------------+-----------------><
'-optional item-'
If you must choose one of the items, one item of the stack appears on the main path. If choosing an item is optional, the entire stack appears below the main path:
>>-STATEMENT--+-required-choice-1-+--+-------------------+-----><
'-required-choice-2-' +-optional-choice-1-+
'-optional-choice-2-'
.-----------------.
V |
>>-STATEMENT----repeatable-item-+------------------------------><
.--------------. .--------------.
V | V |
>>-STATEMENT----+-choice-1-+-+----+----------+-+---------------><
'-choice-2-' +-choice-3-+
'-choice-4-'
The following example shows how the syntax diagram conventions are used:
Format
(1) (2)
>>-STATEMENT-------+-identifier-1------+------------------------>
'-literal-1---------'
.---------------------.
V |
>----+-----------------+-+-------------------------------------->
| (3) |
'-| item 1 |------'
.------------------------------------.
V (4) |
>----TO--identifier-m--+---------+------+----------------------->
'-ROUNDED-'
(5)
>--+--------------------------------------------+--------------->
'-+----+--SIZE ERROR--imperative-statement-m-'
'-ON-'
(6)
>--+---------------+-------------------------------------------><
'-END-STATEMENT-'
item 1:
|--+-identifier-2------------+----------------------------------|
+-literal-2---------------+
'-arithmetic-expression-1-'
Notes:
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.