Identifying BDAM records

You identify records in BDAM data sets by a block reference, a physical key (keyed data set), or a deblocking argument (blocked-data set).

The RIDFLD (record identification field) option on the CICS file control commands identifies a field containing the record identification appropriate to the access method and the type of file being accessed. For most things you can do to a record (read, add, delete, or start a browse), you identify the record by specifying the RIDFLD option, except when you have read the record for update first. (However, there is no RIDFLD for ENDBR, REWRITE, and UNLOCK commands.)

For BDAM records, the record identification in the RIDFLD option has a subfield for the block reference, the physical key, and the deblocking argument. These subfields, when used, must be in the order given previously.

Note: When using EDF, only the first of the above three fields (the block reference subfield) is displayed.

Block reference subfield

This is one of the following:
  • Relative block address: 3 byte binary, beginning at relative block zero (RELTYPE=BLK).
  • Relative track and record (hexadecimal format): 2 byte TT, 1 byte R (RELTYPE=HEX).

    The 2 byte TT begins at relative track zero. The 1 byte R begins at relative record one.

  • Relative track and record (zoned decimal format): 6 byte TTTTTT, 2 byte RR (RELTYPE=DEC).
  • Actual (absolute) address: 8-byte MBBCCHHR (RELTYPE operand omitted).

The system programmer must specify the type of block reference you are using in the RELTYPE operand of the DFHFCT TYPE=FILE system macro that defines the data set.

Physical key subfield

You only need this if the data set has been defined to contain recorded keys. If used, it must immediately follow the block reference. Its length must match the length specified in the BLKKEYL operand of the DFHFCT TYPE=FILE system macro that defines the data set.

Deblocking argument subfield

You only need this if you want to retrieve specific records from a block. If used, it must immediately follow the physical key (if present) or the block reference. If you omit it, you retrieve an entire block.

The deblocking argument can be a key or a relative record number. If it is a key, specify the DEBKEY option on a READ or STARTBR command and make sure that its length matches that specified in the KEYLEN operand of the DFHFCT TYPE=FILE system macro. If it is a relative record number, specify the DEBREC option on a READ or STARTBR command. It is a 1 byte binary number (first record=zero).

Figure 1 shows examples of the following possible forms of BDAM record identifiers. The examples assume a physical key of four bytes and a deblocking key of three bytes:
  • Relative block number followed by relative record number for search by relative block and deblock by relative record
  • Relative block number followed by a key for search by relative block and deblock by key
  • TTR followed by physical key and deblocking key for search by relative track and record and key and deblock by key
  • MBBCCHHR followed by relative record number for search by actual address and deblock by relative record
  • TTTTTRR followed by physical key and deblocking key for search by zoned decimal relative track and record and key and deblock by key
  • TR followed by physical key for search by relative track and record and deblock by key
Figure 1. Examples of BDAM record identification
Examples of BDAM record identification as described in the preceding text.