EGL Reference Guide for iSeries

Relative record part in EGL source format

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:



Syntax diagram for a relative record part

Record recordPartName relativeRecord
Identifies the part being of type relativeRecord and specifies the name. For the rules of naming, see Naming conventions.
fileName = fileName
The file name. For details on the meaning of your input, see Resource associations (overview). For rules, see Naming conventions.
keyItem = keyItem
The key item, which can be any of these areas of memory:

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.

structureItem
A structure item, as described in Structure item in EGL source format.


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


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]