gtpc2mhyC/C++ Language Support User's Guide

TO2_recoupDS-Return a List of Internal PIDs to Be Recouped

This function returns a sequence collection that contains a list of the TPF collection support (TPFCS) internal persistent identifiers (PIDs) that need to be recouped.

Format

#include <c$to2.h>
long  TO2_recoupDS(const TO2_PID_PTR  pid_ptr,
                         TO2_ENV_PTR  env_ptr,
                         char         dsname)

pid_ptr
The pointer to the location where the persistent identifier (PID) of the returned collection is to be stored.

env_ptr
The pointer to the environment as returned by the TO2_createEnv function.

dsname
The pointer to a character string, which is the name of the data store (DS) containing the collections to be recouped. The character string must be 8 characters in length, left-justified, and padded with blanks (X'40') on the right.

Normal Return

The normal return is a positive value.

Error Return

An error return is indicated by a zero. When zero is returned, use the TO2_getErrorCode function to determine the specific error code. For more information, see Error Handling.

Programming Considerations

Examples

The following example retrieves the sequence collection of internal PIDs for the data store indicated.

#include <c$to2.h>             /* Needed for TO2 API functions    */
#include <stdio.h>             /* APIs for standard I/O functions */
 
TO2_PID      collect;
char         dsname[] = "MYDS    "; /* Data store name            */
TO2_ENV_PTR  env_ptr;          /* Pointer to TO2 environment      */

  ·
  ·
  ·
if (TO2_recoupDS(&collect, env_ptr, dsname) == TO2_ERROR) { printf("TO2_recoupDS failed!\n"); process_error(env_ptr); } else { printf("TO2_recoupDS successful!\n"); }

Related Information