You declare a fixed record part of type relativeRecord in an EGL source file, which is described in EGL source format.
Record myRelativeRecordPart type relativeRecord { fileName = "myFile", keyItem = "myKeyItem" } 10 myKeyItem NUM(4); 10 myContent CHAR(76); end
You must use an unqualified reference to name the key field. For example, use myField rather than myRecord.myField. (In a function, however, you can reference the key field as you would reference any field.) The key field 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.
Only the get and add statements use the relative record key field, but the key field must be available to any function that uses the fixed record for file access.
Related concepts
EGL projects, packages, and files
References to parts
Parts
Record parts
References to variables in EGL
Typedef
Related tasks
Syntax diagram for EGL statements and commands
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 field in EGL source format