Home > Articles > Data > DB2

  • Print
  • + Share This
This chapter is from the book

1.11 DB2 Syntax Diagram Conventions

DB2 supports a comprehensive set of statements for data access and manipulation. These statements are documented online in the DB2 Information Center, which gives you access to all information about DB2 as well as major DB2 features and components. It can be conveniently accessed by using a browser, as shown in Figure 1.15. The DB2 Information Center is also available at http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp.

Figure 1.15

Figure 1.15 The DB2 Information Center

You can find the syntax of any commands or statements we introduce in this book in the DB2 Information Center. Understanding how to read the syntax diagrams will help you use the numerous options available with many of the statements.

Syntax diagrams are all read from left to right and top to bottom, following the path of each line. Table 1.6 summarizes a few of the most commonly used symbols in a syntax diagram.

Table 1.6. Summary of Some Symbols Used in Syntax Diagrams

Symbol

Description

>>---

Indicates the beginning of a syntax diagram.

--->

Indicates that the syntax is continued on the next line.

>---

Indicates that the syntax is continued from the previous line.

---><

Indicates the end of a syntax diagram.

When a mandatory field is required, it appears on the horizontal line (the main path) like this.

   >>-mandatory_field--------------------------------------><

Optional fields appear below the main path.

   >>-mandatory_field--+----------------+------------------><
                          '-optional_field-'

If an optional field appears above the main path, it means that it is the default option.

                          .-default_field-.

   >>-mandatory_field--+---------------+-------------------><
                          '-optional_field-'

If two or more mandatory choices are available, one of the mandatory choices will appear in the main path, and the rest will appear in a stack. You must choose one of these options.

   >>-mandatory_field--+-mandatory_choice1-+---------------><
                          '-mandatory_choice2-'

An arrow returning to the left, above the main line, indicates an option can be repeated. In this example, repeated options are separated by one or more blanks.

                           .-----------------.
                           V                 |

   >>-mandatory_field----repeatable_field-+----------------><

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

                           .-,---------------.
                           V                 |

   >>-mandatory_field----repeatable_field-+----------------><

You should now feel comfortable reading syntax diagrams in the DB2 documentation. Browse through the DB2 online documentation and review some examples there.

  • + Share This
  • 🔖 Save To Your Account