gtpc2m2zC/C++ Language Support User's Guide

finwc_ext-Find 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 entry control block (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.

Format

#include   <tpfio.h>
void       *finwc_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
Sum of the following bit flags that 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, finwc_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 finwc 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 = finwc_ext(D7,FIND_GDS);

Related Information