DBKEY-activate a key list
Use this macro to activate a key list that is used by subsequent macros that access the specified file. See Specifying Logical Records (LRECs) Using Keys for more information about keys.
Format
- REF=dsectvv
- specifies the file that you want to access, where dsectvv is the 6-character DSECT name and an optional 1- or 2-character suffix.
- REF=refname
- specifies the name associated with the file that you want to access, where refname
is a label that references the name in one of the following formats:
- refname
- is the label of an 8-byte field that contains the reference name.
- A/refname
- is the label of a 4-byte field that contains the storage address of an 8-byte field that contains the reference name.
The reference name can be any 8-byte value that is unique for the current ECB.
- FILE=dsect
- specifies the file or subfile that you want to access, where dsect is the 6-character DSECT name.
- R3=address
- specifies the location of the SW00SR slot for this subfile, where address is the
label of a field that contains the address of the SW00SR slot. Register 3 will be loaded with this
address. Note: Do not use this parameter; it is provided only for migration purposes. Use the REF parameter to specify the file that you want to access.
- KEYLIST=keyloc
- specifies a key list that you want to use with this macro, where keyloc is one of
the following:
- A register that contains the address of the key list
- A label in one of the following formats:
- keyloc
- is a label indicating the address of the key list.
- A/keyloc
- is the label of a 4-byte field that contains the storage address of the key list.
See Setting Up and Using a Key List for information about how to set up a key list.
- NOPGM
- specifies not to change the program stamp in a block when filing it.
Entry requirements
None.
Normal return
None.
Error return
See Identifying Return Indicators and Errors for information about how to check the error indicators.
Programming considerations
- The optional 2-character version on the REF parameter allows you to access more than one subfile in the same file at the same time. For example, you can code REF=IR71DF01,ALG==C"A" to access subfile A and REF=IR71DF02,ALG==C"B" to access subfile B.
- If you specify a label, the label must be more than 3 characters long.
- The contents of register 14 (R14) and R15 cannot be predicted across a TPFDF macro call.
- The contents of R3, which contains the storage address of the SW00SR slot, are used by TPFDF macro calls. Do not change the value of R3 between macro calls unless you save the value after each macro call and restore the value before each macro call.
- The key list can define as many as 180 key parameters or it can indicate that default keys will be used. See Setting Up and Using a Key List for more information about defining a key list.
- Several macros provide a KEYLIST parameter, which generates an internal DBKEY macro.
Examples
See Using a Key List with the DBSETK Macro for an example of activating key list with the DBKEY macro.
