Keys for File Operations

With the file operations CHAIN, DELETE, READE, READPE, SETGT and SETLL,the search argument, search-arg, must be the key or relative record number used to identify the record. For free-form calculations, a search argument may be:
  1. A single field name
  2. A klist name
  3. A list of values, such as "(a:b:c+2)". Each part of the composite key may be an expression.

    By default, data types must match the corresponding key field, but lengths, data format and CCSID do not have to match.

    When keyword EXPROPTS(*STRICTKEYS) is specified in a Control statement, the rules are more strict. See *STRICTKEYS.

  4. %KDS(ds{:num})

    A composite key is formed from the subfields of the specified data structure in turn. If num is specified, that is the number of subfields to use in the composite key.

    By default, data types must match with the corresponding key field, but lengths, data format, and CCSID do not have to match. Rules for moving data from expression values to the key build area are the same as for operations code EVAL in that shorter search arguments are padded on the right with blanks and longer search arguments are truncated for type character.

    When keyword EXPROPTS(*STRICTKEYS) is specified in a Control statement, the rules are more strict. See *STRICTKEYS.

For non-free-form calculations, only field names and klist names are allowed as search argument.

Operation extenders H, M, and R are allowed for CHAIN, DELETE, READE, READPE, SETGT, and SETLL when a list of search arguments or %KDS is specified. These extenders apply to the moving of the individual search argument to the search argument build area. See Ensuring Accuracy.