NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-97
DDL Clause Mapping
The key specifier for each alternate key in the DDL record definition is used in the
KEYTAG clause of the CREATE INDEX command to associate a key specifier with an
index.
If a field name defined with a DDL REDEFINES clause is used as a primary or alternate
key, CONVERT determines which column is to be the key based on the REDEFINE
option of the CONVERT command. If you do not include the REDEFINE option,
CONVERT uses the original field as the key column.
For example, if the primary key CURRENT_DATA redefines EMPINFO, CONVERT
uses EMPINFO—not CURRENT_DATA—as the primary key. You can use the
REDEFINE option to specify that you want to use the redefined field instead of the
original one. For example, if you specify REDEFINE (EMPINFO AS
CURRENT_DATA), the CURRENT_DATA is used as the primary key.
Indexes are automatically loaded with data when the table is loaded.
DDL Clause Mapping
The following DDL record definition clauses define constructs that are not used in SQL:
OCCURS and OCCURS DEPENDING ON clauses define repeating fixed or
varying groups or arrays. For SQL, each elementary item in the OCCURS group is
converted to a table column, and the table column is repeated a fixed number of
times. The names of repeated columns are derived from the DDL elementary item
name combined with the array index value. For OCCURS MIN TO MAX TIMES
DEPENDING ON field-name, table columns are repeated MAX number of
times.
Fields with FILLER clauses are skipped.
Conversion of a VALUE IS clause depends on the CONVERT option specified. The
two forms of the DDL VALUE IS clause used with PIC X, PIC A, and TYPE
CHARACTER fields are:
VALUE IS "default-string"
VALUE IS ALL "default-character"
The two forms of the DDL VALUE IS clause used with PIC N fields are:
VALUE IS N"default-string"
VALUE IS ALL N"default-character"
If the CHARACTER option, the NATIONAL option, or the NATIONAL DEFAULT
option is not specified, the VALUE IS clause is converted as follows: