IBM Books

API Reference

sqluhgne - Get Next Recovery History File Entry

Gets the next entry from the recovery history file. This API must be preceded by a successful call to sqluhops - Open Recovery History File Scan.

Authorization

None

Required Connection

Instance. It is not necessary to call ATTACH before issuing this API.

API Include File

sqlutil.h

C API Syntax



/* File: sqlutil.h */
/* API: Get Next Recovery History File Entry */
/* ... */
SQL_API_RC SQL_API_FN
  sqluhgne (
    unsigned short Handle,
    unsigned short callerac,
    struct sqluhinfo * pHistoryInfo,
    struct sqlca * pSqlca);
/* ... */

Generic API Syntax



/* File: sqlutil.h */
/* API: Get Next Recovery History File Entry */
/* ... */
SQL_API_RC SQL_API_FN
  sqlghgne (
    unsigned short Handle,
    int callerac,
    struct sqluhinfo * pHistoryInfo,
    struct sqlca * pSqlca);
/* ... */

API Parameters

Handle
Input. Contains the handle for scan access that was returned by sqluhops - Open Recovery History File Scan.
callerac
Input. Valid values (defined in sqlutil) are:
SQLUH_GET_NEXT_ENTRY
Retrieve the next matching entry.
SQLUH_GET_DDL
If this caller action is passed to the API immediately after fetching an entry, the DDL data associated with that entry is returned. Currently, only dropped table events contain DDL information. If this caller action is passed after fetching an entry for any other event type, no additional data is returned.
pHistoryInfo
Output. A pointer to the recovery history file entry information buffer (see SQLUHINFO). The history file information is returned in the memory pointed to by this parameter.
pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax



GET RECOVERY HISTORY FILE ENTRY :scanid [USING :value]

REXX API Parameters

scanid
Host variable containing the scan identifier returned from OPEN RECOVERY HISTORY FILE SCAN.
value
A compound REXX host variable into which the recovery history file entry information is returned. In the following, XXX represents the host variable name:

XXX.0
Number of first level elements in the variable (always 15)

XXX.1
Number of table space elements

XXX.2
Number of used table space elements

XXX.3
OPERATION (type of operation performed)

XXX.4
OBJECT (granularity of the operation)

XXX.5
OBJECT_PART (time stamp and sequence number)

XXX.6
OPTYPE (qualifier of the operation)

XXX.7
DEVICE_TYPE (type of device used)

XXX.8
FIRST_LOG (earliest log ID)

XXX.9
LAST_LOG (current log ID)

XXX.10
BACKUP_ID (identifier for the backup)

XXX.11
SCHEMA (qualifier for the table name)

XXX.12
TABLE_NAME (name of the loaded table)

XXX.13.0
NUM_OF_TABLESPACES (number of table spaces involved in backup or restore)

XXX.13.1
Name of the first table space backed up/restored

XXX.13.2
Name of the second table space backed up/restored

XXX.13.3
and so on

XXX.14
LOCATION (where backup or copy is stored)

XXX.15
COMMENT (text to describe the entry).

Sample Programs

C
\sqllib\samples\c\rechist.c

COBOL
\sqllib\samples\cobol\rechist.cbl

FORTRAN
\sqllib\samples\fortran\rechist.f

REXX
\sqllib\samples\rexx\rechist.cmd

Usage Notes

The records that are returned will have been selected using the values specified on the call to sqluhops.

For a detailed description of the use of the recovery history file APIs, see sqluhops - Open Recovery History File Scan.

See Also

sqluhcls - Close Recovery History File Scan



[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]