gtpc2m30C/C++ Language Support User's Guide

fiwhc-Find and Hold a File Record and Wait

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(enum t_lvl level);

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.

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 file on level D2 with hold. The file address has already been calculated and resides in the level D2 FARW. Control is returned to the operational program when the I/O is complete and the record has been attached to the specified level.

#include <tpfio.h>
struct im0im *inm;

  ·
  ·
  ·
inm = fiwhc(D2);

Related Information