Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 21
OCCURS Clause
NULL Clause Examples
The following example shows the use of the NULL clause. In this example, if the
employee does not have a spouse or dependents, the key is not added to the alternate
key file:
RECORD employee.
FILE IS "employee" key-sequenced.
02 empinfo.
04 empid PIC 9(4).
04 empname PIC X(22).
04 dept PIC X(4).
02 taxinfo NULL 0.
04 spousename PIC X(22).
04 dependents PIC 9(2).
KEY IS empid.
KEY "ti" is taxinfo.
END
You could also use a constant name to specify the NULL value in the preceding
example; for example:
CONSTANT null-0 VALUE 0.
...
02 taxinfo NULL null-0.
04 spousename PIC X(22).
04 dependents PIC 9(2).
OCCURS Clause
The OCCURS clause specifies that a field or group is repeated a fixed number of
times
.
max
is an integer from 1 to 32,767 that specifies the number of times the field or group
is repeated.
constant-name
is the name of a constant in the open DDL dictionary. The constant value must be
a valid
max
value.
OCCURS {max } [TIMES] [INDEXED BY index-name]
{constant-name}
Содержание 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 ...