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.
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 reference
Assignments
EGL source format
Data initialization
Primitive types