Structure item in EGL source format
An example of a structure item is as follows:
10 address; 20 street01 CHAR(20); 20 street02 CHAR(20);The syntax diagram for a structure item is as follows:
- level
- Integer that indicates the hierarchical position of a structure item.
- structureItemName
- Name of a structure item. For rules, see Naming conventions.
- *
- Indicates that the structure item describes a filler, which is a memory area whose name is of no importance. An asterisk is not valid in a reference to an area of memory, as noted in References to variables and constants.
- primitiveType
- The primitive type assigned to the structure item.
- length
- The structure item's length, which is an integer. The value of a memory area that is based on the structure item includes the specified number of characters or digits.
- decimals
- For a numeric type (BIN, DECIMAL, NUM, NUMC, or PACF), you may specify decimals, which is an integer that represents the number of places after the decimal point. The maximum number of decimal positions is the smaller of two numbers: 18 or the number of digits declared as length. The decimal point is not stored with the data.
- "dateTimeMask"
- For items of type INTERVAL or TIMESTAMP, you may specify "dateTimeMask", which assigns a meaning (such as "year digit") to a given position in the item value. The mask is not stored with the data.
- dataItemPartName
- Specifies the name of a dataItem part that acts as a model of format for the structure item being declared. For details, see typeDef.
- embed recordPartName
- Specifies the name of a record part and embeds the structure of that record part into the current record. The embedded structure does not add a level of hierarchy to the current record. For details, see typeDef.
- recordPartName
- Specifies the name of a record part and includes the structure of that record part in the current record. In the absence of the word embed, the record structure is included as a substructure of the structure item being declared. For details, see typeDef.
- occurs
- The number of elements in an array of structure items. The default is 1, which means that the structure item is not an array unless you specify otherwise. For details, see Arrays.
- property
- An item property, as described in Overview of EGL properties and overrides.
Related concepts
Overview of EGL properties and overrides
Related reference
Arrays
Naming conventions
Primitive types
References to variables and constants
Typedef