Record part
A Record part defines a set of data elements. The Record stereotype associates the part with an external data store (for example, a row in a relational database table or view, or a record in a file). For more information, see Stereotypes. For information about the structured Record, which uses level numbers to specify the exact layout of its fields, see Records.
You must define Records outside of any other part, including programs and libraries. This automatically places the Record in package scope.
EGL provides a general purpose Record stereotype, the BasicRecord, as part of the core EGL package. This topic uses the basic record to describe the core qualities of the Record part.
Syntax

- recordPartName
- Specifies the name of the custom record part.
- stereotype
- Specializes the record for a particular data access technology. The basicRecord type is the only stereotype provided in the core EGL package. For other stereotypes you might have available, see the related references at the end of this topic.
- properties
- Provide vital information (depending on stereotype) such as the name of the key field. There are no properties associated with the BasicRecord stereotype.
- level
- Iidentifies the substructure level of a field as a literal integer. Level numbers indicate that the record is structured; they are required on structured records and do not appear on non-structured records. You can use any integers you like to indicate level numbers, with the restriction that the lowest numbers indicate the highest levels in the structure.
- field
- Declares a variable appropriate to a record field. This variable
is typically a primitive data type, a data item, or another record.
As with any other variable declaration, each must end in a semicolon
(;). There are additional restrictions for structured records, where
EGL supports only the following types:
- Primitive types or data items with a fixed or specified length (for example, INT or CHAR(10), but not STRING)
- Other structured records
- Arrays of any of the preceding types, with a fixed dimension
Example
Record CustomerRecord type BasicRecord
customerNumber INT;
customerName STRING;
customerAddr1 STRING;
customerAddr2 STRING;
customerAddr3 STRING);
customerBalance MONEY;
end