You declare a record part of type relativeRecord in an EGL file, which is described in EGL source format.
An example of a relative record part is as follows:
Record myRelativeRecordPart type relativeRecord { fileName = myFile, keyItem = myKeyItem } 10 myKeyItem NUM(4); 10 myContent CHAR(76); end
The syntax diagram of a relative record part is as follows:
You must use an unqualified reference to name the key item. For example, use myItem rather than myRecord.myItem. (In a function, however, you can reference the key item as you would reference any item.) The key item must be unique in the local scope of the function that accesses the record or must be absent from local scope and unique in global scope.
The key item has these characteristics:
Only the get and add statements use the relative record key item, but the key item must be available to any function that uses the record for file access.
Related concepts
EGL projects, packages, and files
References to parts
Parts
Record parts
References to variables and constants
Typedef
Related tasks
Syntax diagram
Related reference
Arrays
DataItem part in EGL source format
EGL source format
Function part in EGL source format
Indexed record part in EGL source format
MQ record part in EGL source format
Naming conventions
Primitive types
Program part in EGL source format
Resource associations and file types
Serial record part in EGL source format
SQL record part in EGL source format
Structure item in EGL source format
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.