bdfp1m1sProgramming Concepts and Reference

dfuky-Generate a Unique Key for Use in Logical Records

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

Format

char *dfuky(dft_fil *file);

file
is a pointer to the base address of the SW00SR slot (defined in c$sw00sr.h) of the subfile that you want to access and is returned by the dfopn function.

Entry Requirements

None.

Normal Return

A pointer to the 4-byte unique key value returned by the TPFDF product.

Error Return

Programming Considerations

Examples

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

dft_fil *file_ptr;

  ·
  ·
  ·
dfuky(file_ptr);

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 Functions

dfkey-Activate a Key List.