bdfp1m1dProgramming Concepts and Reference

dfmod-Perform or Indicate Logical Record Modifications

Use this group of functions to:

Format

dft_rec *dfmod(dft_fil *file);
dft_rec *dfmod_all(dft_file file, dft_kyl *mod_list)
dft_rec *dfmod_all_opt(dft_file file, dft_opt options,
         dft_kyl *mod_list);
dft_rec *dfmod_all_acc(dft_file file, dft_opt access,
         dft_opt options, dft_kyl *mod_list, dft_xxx acc);
dft_rec *dfmod_all_key(dft_file file, dft_opt options,
         dft_kyl *mod_list, dft_kyl *key_list);
dft_rec *dfmod_all_acc_key(dft_file file, dft_opt access,
         dft_opt options, dft_kyl *mod_list, dft_xxx acc,
         dft_kyl *key_list);



acc
is an ordinal number, a file address, or a pointer to an algorithm string that specifies the subfile you want to access. The type for this parameter is determined by the value you specify for the access parameter.

access
is the method you want to use to access the subfile. Use one of the following values:

DFMOD_ALG
specifies that you are providing a pointer to an algorithm argument in the acc parameter. The acc parameter is of type dft_alg.

The TPFDF product uses the algorithm argument to determine the subfile (ordinal number) that is to be accessed. Specify the algorithm argument based on the type of algorithm that is defined in the DSECT or DBDEF macro for the file. If the DSECT or DBDEF macro defines the #TPFDB04 or the #TPFDB0D algorithm, do not use this parameter.

If the subfile you are accessing is contained in a detail file or intermediate index file defined with the #TPFDBFF algorithm, the TPFDF product uses the algorithm argument to locate the subfile. See TPFDF Database Administration for more information about how the TPFDF product uses the algorithm argument to locate the subfile.

DFMOD_FADDR
specifies that you are providing a file address in the acc parameter. A file address is in integer format. The acc parameter is of type dft_fad.

DFMOD_ORD
specifies that you are providing an ordinal number in the acc parameter. Ordinal numbers in a file start at zero and are in integer format. The acc parameter is of type dft_ord.

If the file is partitioned or interleaved, specify the relative ordinal number within the partition or interleave. If the file is not partitioned or interleaved, specify the file address compute program (FACE) ordinal number.

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.

key_list
is a pointer to the selection key list that determines which LRECs are to be modified. See df_setkey-Setting Up a Key in a Key List for information about how to set up a selection key list.

mod_list
is a pointer to the modification key list that describes how the LRECs are to be modified. See df_setkey-Setting Up a Key in a Key List for information about how to set up a modification key list.

options
are the processing options for this function. Use the following values:

DFMOD_BEGIN
modifies LRECs starting from the beginning of the subfile. If you do not specify DFMOD_BEGIN, LRECs are modified starting from the current LREC.

DFMOD_FULLFILE
modifies LRECs in all subfiles of the file, not just the current subfile.

DFMOD_NODUMP
specifies that you do not want the TPFDF product to issue any of the following system errors while processing this function:
  • DB0100
  • DB0102
  • DB0117
  • DB0123
  • DB0138
  • DB0140.

See Messages (System Error, Online, Offline) and Master Glossary for more information about these system errors.

Note:
Using the DFMOD_NODUMP value is not recommended because it can prevent system errors from being issued that indicate a critical problem.

DFMOD_NOKEY
deactivates any currently active keys.

0
specifies that you do not want to use any processing options.

Entry Requirements

None.

Normal Return

Error Return

None.

Programming Considerations

Examples

Related Functions