bdfp1m2pProgramming Concepts and Reference

DBUKY-Generate a Unique Key for Use in Logical Records

Use this macro to generate a unique key in the SW00SR slot for the subfile.

Format




REF=dsectvv
specifies the file or subfile that you want to access, where dsectvv is the DSECT name and an optional 2-character version.

REF=refname
specifies the file or subfile that you want to access, where refname is a label that references the DSECT name in one of the following formats:

refname
is the label of an 8-byte field that contains the 6-byte DSECT name and an optional 2-character version.

A/refname
is the label of a 4-byte field that contains the storage address of the DSECT name and an optional 2-character version.

FILE=dsect
specifies the file or subfile that you want to access, where dsect is the DSECT name.

NOPGM
specifies not to change the program stamp in a block when filing it.

SUFFIX=char
allows you to use the same DSECT to map two different areas of storage, where char is the suffix character.

Entry Requirements

None.

Normal Return

The new unique key value is returned in the 4-byte SW00UKY field of the SW00SR.

Error Return

Programming Considerations

Examples

The following example generates a unique key value for file GR34DF. The value is placed in the SW00UKY field in the SW00SR slot.

DBUKY REF=GR34DF

The following is an example of a header expanded by 18 bytes so that the unique key feature can be used.

IRXXHDR& DS  CL16         STANDARD FILE HEADER
         DS  CL10         STANDARD TPFDF HEADER
         DS  CL18         UNIQUE KEY HEADER EXTENSION

Related Macros

DBKEY-Activate a Key List.