The ER record buffer transfers member records between caller and LMS in either direction. Members consist of variable-length records, i.e. a 4-byte record header is always prefixed to the data area.
Field | Meaning | Length in | Contents after |
Record header | 2 | Record length max | |
1 | reserved | ||
1 | Record type | ||
Record area (see GET) | variable | Current record |
When a record is read, the record header in ER is supplied by LMS. The record length value is derived from the minimum record length of the record read and the buffer length specified by the user in RD. Record types 1-159, 163 and 164 can be read (record types 1-159 may be freely selected by the user).
When a record is written (PUT), the first 4 bytes in ER are reserved for the record header. In PUT, however, the record header in ER is not analyzed.
The record buffer ER is required in the GET and PUT functions.
Exception
Format B records (record type 160)
Format B records do not have a record header. The record length is a multiple of 2K, to a maximum of 256K. The size of the record buffer (ER) must be chosen accordingly (also refer to OPENGET and GET).