Fixed record parts

A fixed record part defines a sequence of data whose length is known at generation time. This kind of part is necessarily composed of a series of primitive, fixed-length fields, and each field can be substructured. A field that specifies a telephone number, for example, can be defined as follows:
   10 phoneNumber    CHAR(10);
      20 areaCode    CHAR(3);
      20 localNumber CHAR(7);

Although you can use fixed records (which are variables) for any kind of processing, their best use is for I/O operations on VSAM files, MQSeries® messages queues, and other sequential files. Although you can use fixed records for accessing relational databases or for general processing (as was the case with earlier products such as VisualAge® Generator), you should avoid using fixed records for those purposes in new development.

A record part of any of the following types is a fixed record part:
In addition, a record part of any of the following types is a fixed record part if each field is preceded by a level number:
You can use a fixed record in the following contexts:

Any relationship of a fixed record part to an external data source is determined by the type of the fixed record part and by a set of type-specific properties such as fileName. A record based on a part of type indexedRecord, for example, is used for accessing a VSAM Key Sequenced Data Set. The relationship of a record part to a data source determines the operations that are generated when the fixed record is used in an EGL I/O statement such as add.

A fixed-record field can be based on another fixed record part; and in assignment statements, that field is treated as a memory area of type CHAR regardless of the types in the fixed record part.

Related concepts
DataItem part
Non-fixed record parts
Record parts
Record types and properties
Resource associations and file types
Fixed structure
Typedef

Related tasks
Setting the default build descriptors
Setting preferences for the EGL editor

Related reference
Assignments
EGL source format
Data initialization
Primitive types

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.