Adding records to BDAM data sets

Records added to a BDAM data set can be undefined or variable-length (keyed or nonkeyed), keyed fixed-length, nonkeyed fixed-length, or variable-length blocked.

About this task

When adding records to a BDAM data set, bear in mind the following:
  • When adding undefined or variable-length records (keyed or nonkeyed), you must specify the track on which each new record is to be added. If space is available on the track, the record is written following the last previously written record, and the record number is put in the "R" portion of the record identification field of the record. The track specification can be in any format except relative block. If you use zoned-decimal relative format, the record number is returned as a 2 byte zoned decimal number in the seventh and eighth positions of the record identification field.

    The extended search option allows the record to be added to another track if no space is available on the specified track. The location at which the record is added is returned to the application program in the record identification field being used.

    When adding records of undefined length, use the LENGTH option to specify the length of the record. When an undefined record is retrieved, the application program must find out its length.

  • When adding keyed fixed-length records, you must first format the data set with dummy records or "slots" into which the records can be added. You signify a dummy record by a key of X'FF' s. The first byte of data contains the record number.
  • When adding nonkeyed fixed-length records, give the block reference in the record identification field. The new records are written in the location specified, destroying the previous contents of that location.
  • When adding keyed fixed-length records, track information only is used to search for a dummy key and record, which, when found, is replaced by the new key and record. The location of the new record is returned to the application program in the block reference subfield of the record identification field.
    For example, for a record with the following identification field:
    0 3 0 ALPHA
    T T R KEY
    the search starts at relative track three. When control is returned to the application program, the record identification field is:
    0 4 6 ALPHA

    showing that the record is now record six on relative track four.

  • When adding variable-length blocked records you must include a 4 byte record description field (RDF) in each record. The first 2 bytes specify the length of the record (including the 4 byte RDF); the other 2 bytes consist of zeros.


dfhp3kg.html | Timestamp icon Last updated: Monday, 5 June 2017