How to read syntax diagrams

This section describes how to read syntax diagrams. It defines syntax diagram symbols, items that may be contained within the diagrams (keywords, variables, delimiters, operators, fragment references, operands) and provides syntax examples that contain these items.

Syntax diagrams pictorially display the order and parts (options and arguments) that comprise a command statement. They are read from left to right and from top to bottom, following the main path of the horizontal line.


Symbols

The following symbols may be displayed in syntax diagrams:

Symbol
Definition

>>---
Indicates the beginning of the syntax diagram.

--->
Indicates that the syntax diagram is continued to the next line.

>---
Indicates that the syntax is continued from the previous line.

---><
Indicates the end of the syntax diagram.

Syntax items

Syntax diagrams contain many different items. Syntax items include:

Keywords, variables, and operators may be displayed as required, optional, or default. Fragments, separators, and delimiters may be displayed as required or optional.

Item type
Definition

Required
Required items are displayed on the main path of the horizontal line.

Optional
Optional items are displayed below the main path of the horizontal line.

Default
Default items are displayed above the main path of the horizontal line.

Syntax examples

The following table provides syntax examples.

Table 1. Syntax examples

Item Syntax example
Required item.

Required items appear on the main path of the horizontal line. You must specify these items.

>>-KEYWORD--required_item--------------------------------------><
 
 
Required choice.

A required choice (two or more items) appears in a vertical stack on the main path of the horizontal line. You must choose one of the items in the stack.

>>-KEYWORD--+-required_choice1-+-------------------------------><
            '-required_choice2-'
 
 
Optional item.

Optional items appear below the main path of the horizontal line.

>>-KEYWORD--+---------------+----------------------------------><
            '-optional_item-'
 
 
Optional choice.

A optional choice (two or more items) appear in a vertical stack below the main path of the horizontal line. You may choose one of the items in the stack.

>>-KEYWORD--+------------------+-------------------------------><
            +-optional_choice1-+
            '-optional_choice2-'
 
 
Default.

Default items appear above the main path of the horizontal line. The remaining items (required or optional) appear on (required) or below (optional) the main path of the horizontal line. The following example displays a default with optional items.

            .-default_choice1--.
>>-KEYWORD--+------------------+-------------------------------><
            +-optional_choice2-+
            '-optional_choice3-'
 
 
Variable.

Variables appear in lowercase italics. They represent names or values.

>>-KEYWORD--variable-------------------------------------------><
 
 
Repeatable item.

An arrow returning to the left above the main path of the horizontal line indicates an item that can be repeated.

An arrow returning to the left above a group of repeatable items indicates that one of the items can be selected, or a single item can be repeated.

            .-----------------.
            V                 |
>>-KEYWORD----repeatable_item-+--------------------------------><
 
 
IBM Copyright 2003