SPI Tokens
Data Definition Language (DDL) Reference Manual — 426798-002
7 -6
TOKEN-TYPE Statement
The definition ZSPI-DDL-INT specifies the structure of all simple tokens of the token
type ZSPI-TYP-INT:
DEF zspi-ddl-int TYPE BINARY 16 SPI-NULL 0.
These definitions are in the file ZSPIDEF.ZSPIDDL.
The following examples illustrate the definition of two token types you might define for
your own subsystem.
•
The first token type is defined by reference to the standard definition shown in the
preceding example:
TOKEN-TYPE assn-typ-status
VALUE IS zspi-tdt-int
DEF IS zspi-ddl-int.
Notice that this token type,
assn-typ-status
, is identical to the token type
ZSPI-TYP-INT except for its name. You could use ZSPI-TYP-INT instead of
defining your own token type. This first example illustrates that you have the choice
of redefining a standard token type with a name that is meaningful to your
subsystem.
•
The second token-type example contains a varying number of two-word integers:
Note that the DEF IS clause is included for documentation only; it is not used to
determine the token length of the token type. Because the token type is defined as
variable-length with OCCURS VARYING, the token length is set to 255 by default.
The token’s structure is documented in the following definition:
DEF assn-ddl-variable-token.
02 size TYPE BINARY 16.
02 data-table TYPE BINARY 32
OCCURS 1 TO 100 TIMES DEPENDING ON size.
END
The following examples show the source code DDL generates from the preceding
TOKEN-TYPE statements:
•
COBOL source code:
01 ZSPI-TYP-INT NATIVE-2 VALUE IS 514.
01 ASSN-TYP-STATUS NATIVE-2 VALUE IS 514.
01 ASSN-TYP-VARIABLE-TOKEN NATIVE-2 VALUE IS 1023.
TOKEN-TYPE assn-typ-variable-token•
VALUE zspi-tdt-int2
OCCURS VARYING•
DEF IS assn-ddl-variable-token.
2-word integer token data
type
VST702.vsd
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...