gtpc2mdwC/C++ Language Support User's Guide

TO2_deleteRecoupIndexEntry-Delete an Entry from an Index

This function is used to delete an entry from a TPF collection support recoup index.

Format

#include <c$to2.h>
long TO2_deleteRecoupIndexEntry (      TO2_ENV_PTR  env_ptr,
                                 const void        *indexName,
                                 const void        *entryToken);

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

indexName
The pointer to the 8-byte recoup index name for the recoup index that will be deleted.

entryToken
A user-defined token that was used to identify the index entry when it was created.

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.

The following error code is common for this function:

TO2_ERROR_ENV

Programming Considerations

Delete any references requiring recoup that are affected by this change before the next occurrence of recoup.

Examples

The following example deletes an entry from an index.

#include <c$to2.h>                  /* Needed for TO2 API Functions    */
#include <stdio.h>                  /* APIs for standard I/O functions */
 
TO2_ENV_PTR      env_ptr;           /* Pointer to TO2 environment      */
char             token[8]
 
u_char           indexName="INDEX002"; /* index identifier             */

  ·
  ·
  ·
if (TO2_deleteRecoupIndexEntry(env_ptr, indexName, token) == TO2_ERROR) { printf ("TO2_deleteRecoupIndexEntry failed!\n"); process_error(env_ptr); } else printf("TO2_deleteRecoupIndexEntry successful!\n");

Related Information