Previous Topic: Coding DDL Schema and Subschema StatementsNext Topic: Delimiting Statements


Statement Components

Five Components

Most DDL statements consist of five components, in the following order (exceptions are presented later):

  1. Verb (required) designates the specific operation to be performed by the statement: ADD, MODIFY, REPLACE, DELETE, DISPLAY, or PUNCH. Acceptable verb synonyms are shown in the following table.

Verb

Synonym

ADD

CREATE

MODIFY

ALTER

DELETE

DROP

  1. Entity type (required) identifies the type of data in the dictionary that the selected operation will affect: SCHEMA, AREA, RECORD, SET, SUBSCHEMA, LOGICAL RECORD, or PATH-GROUP.
  2. Entity occurrence name (required) identifies a specific instance of the named entity type.
  3. Optional clauses provide qualifying data for each component occurrence. Optional clauses can be specified in any order, unless individual clause explanations state otherwise.
  4. Period (required) signifies the end of the statement. The period can immediately follow the last word in the statement, can be separated from the last word by blanks, or can appear on a separate line.

    If you specify the SEMICOLON ALTERNATE clause of the SET OPTIONS compiler-directive statement, both the period (.) and the semicolon (;) will be recognized as statement terminators.

Example Statement

The following example illustrates the parts of the typical DDL statement:

ADD    SCHEMA      EMPSCHM    MEMO DATE IS 04/30/92       .
 ▲        ▲           ▲       ▲                   ▲       ▲
 │        │           │       └───────────────────┘       │
verb   entity      entity       optional clause      terminating
        type     occurrence                             period
                    name

Statement Exceptions

Exceptions to the syntax format rule stated above are clearly indicated in both the syntax layouts and the syntax explanations of the individual statements. Exceptions include the following: