Several EGL record types are available:
For details on what target systems support what record types, see Record and file-type cross-reference. For details on how record parts are initialized, see Data initialization.
A basic record has a structure but no properties. This type of record is used for internal processing and cannot access data storage.
Only a basic record part has the data declaration property redefines, which (if set) identifies a record whose memory is accessed by the basic record.
In a main program, the program property inputRecord identifies a basic record that is initialized automatically, as described in Data initialization.
An indexed record lets you to work with a file that is accessed by a key value, which identifies the logical position of a record in the file. You can read the file by invoking a get, get next, or get previous statement. Also, you can write to the file by invoking an add or replace statement; and you can remove a record from the file by invoking a delete statement.
The properties of an indexed record include these:
See also Properties that support variable-length records.
An MQ record lets you access an MQSeries(R) message queue. For details, see MQSeries support.
A relative record lets you to work with a data set whose records have these properties:
The properties of a relative record are as follows:
You must use an unqualified reference to specify the key item. For example, use myItem rather than myRecord.myItem. (In an EGL statement, 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 key item, but the key item must be available to any function that uses the record for file access.
A serial record lets you access a sequentially accessed file or data set. You can read from the file by invoking a get statement, and a series of get next statements reads the file records sequentially, from the first to the last. You can write to the file by invoking an add statement, which places a new record at the end of the file.
Serial record properties include fileName, which is required. For details on the meaning of your input for that property, see Resource associations (overview). For details on the valid characters, see Naming conventions.
See also Properties that support variable-length records.
An SQL record provides special services when you access a relational database.
Each SQL record has the following properties:
In most cases, the SQL default select condition supplements a second condition, which is based on an association between the key item values in the SQL record and the key columns of the SQL table.
For details, see SQL support.
Related concepts
Dynamic SQL
MQSeries support
Record parts
Resource associations and file types
SQL support
Data initialization
delete
execute
get
get next
get previous
MQ record properties
Naming conventions
open
prepare
Properties that support variable-length records
Record and file type cross-reference
replace
SQL item properties
sysVar.terminalID
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.