Paths

Paths show the order in which the command or statement is constructed and are represented by horizontal and vertical lines. Many commands and statements have a number of options so the railroad diagram has a number of different paths you can take.

The following example has three paths:

── REMOVE ─┬──────────┬────────────────────────────────────────────────┤
           ├─ SOURCE ─┤
           └─ OBJECT ─┘

The three paths in the previous example show the following three possible commands:

  • REMOVE

  • REMOVE SOURCE

  • REMOVE OBJECT

A railroad diagram is as complex as a command or statement requires. Regardless of the level of complexity, all railroad diagrams are visual representations of commands and statements.

Railroad diagrams are intended to show

  • Mandatory items

  • User-selected items

  • Order in which the items must appear

  • Number of times an item can be repeated

  • Necessary punctuation

Follow the railroad diagrams to understand the correct syntax for commands and statements. The diagrams serve as quick references to the commands and statements.

Elements of a Railroad Diagram introduces the elements of a railroad diagram.

Table 5. Elements of a Railroad Diagram

The diagram element . . .

Indicates an item that . . .

Constant

Must be entered in full or as a specific abbreviation

Variable

Represents data

Constraint

Controls progression through the diagram path