gtpc2mihC/C++ Language Support User's Guide

Retrieving Data

The data has now been written to the external device and may be retrieved at a later time. To retrieve the data, follow the steps outlined below:

  1. Locate the TPFxd_locationmap that is associated with the data that is to be retrieved.
  2. Issue a TPFxd_open request (for input) and provide the TPFxd_locationmap from step 1.
  3. If the appropriate tape is not already mounted, a tape drive will be selected from one that was assigned to the group ARCHIVE along with a tape name that is not in use. The operator will then be prompted to mount that tape on the drive indicated using the tape name selected. Once the tape has been mounted and positioned to the start of the data that is required, control will be returned to the application that issued the TPFxd_open request.
  4. Issue TPFxd_read or TPFxd_readBlock requests until all the data has been retrieved.
  5. Issue a TPFxd_close request. The tape will be left in reserved status until it is needed by another TPFxd_open request or that tape drive is needed for a different volume serial number (VOLSER), in which case the tape will be closed and dismounted.

The data that was written to the external device is still there and can be retrieved again and again by following the same set of steps. If several groups of data are to be retrieved, request the positioning strings in ascending order to allow for the most effective record retrieval.