gtpc2m31C/C++ Language Support User's Guide

fiwhc_ext-Find and Hold a File Record and Wait with Extended Options

This function reads a record and attaches the block of working storage containing it to the specified data level of the ECB. The ECB must not be holding a storage block on the specified level.

This service finds a record that resides either in VFA or on an external device.

The control program queues this request if the record is being held by another entry. All succeeding requests to hold this record are queued until the record is unheld.

Format

#include   <tpfio.h>
void       *fiwhc_ext(enum t_lvl level, unsigned int ext);

level
One of 16 possible values representing a valid data level from the enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). The data record being retrieved is attached to this level.

ext
Logical or (&or.) of the following bit flags which are defined in tpfio.h.

FIND_GDS
Use FIND_GDS to specify that the record to be read resides in a general file or general data set. If FIND_GDS is not specified, fiwhc_ext accesses the record on the online database.
Note:
If the flag is not needed, the default extended options flag, (FIND_DEFEXT) should be coded. Consider using the find_record function.

Normal Return

Pointer to the working storage block containing the retrieved record image.

Error Return

NULL.

Programming Considerations

Examples

The following example retrieves a data record from a general data set to level D7. The file address has already been calculated and resides in the level D7 FARW. Note that FACS is not used to calculate file addresses for general files or general data sets.

#include <tpfio.h>

  ·
  ·
  ·
inm = fiwhc_ext(D7,FIND_GDS);

Related Information