Gets the next entry from the database history records.
This API must be preceded by a successful call to the db2HistoryOpenScan API.
Note: This
API is only supported in C, C++, or Java™ programming
languages. It is no longer supported in COBOL, FORTRAN and REXX programming
languages. You can issue a query to access database history records
by using the
DB_HISTORY administrative
view.
Required connection
Instance. It is not
necessary to call sqleatin before calling this
API.
API include file
db2ApiDf.h
API and data structure syntax
SQL_API_RC SQL_API_FN
db2HistoryGetEntry (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2HistoryGetEntryStruct
{
struct db2HistoryData *pioHistData;
db2Uint16 iHandle;
db2Uint16 iCallerAction;
} db2HistoryGetEntryStruct;
SQL_API_RC SQL_API_FN
db2gHistoryGetEntry (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
db2HistoryGetEntry API parameters
- versionNumber
- Input. Specifies the version and release level of the structure
passed in as the second parameter, pParmStruct.
- pParmStruct
- Input. A pointer to the db2HistoryGetEntryStruct structure.
- pSqlca
- Output. A pointer to the sqlca structure.
db2HistoryGetEntryStruct data structure parameters
- pioHistData
- Input. A pointer to the db2HistData structure.
- iHandle
- Input. Contains the handle for scan access that was returned by
the db2HistoryOpenScan API.
- iCallerAction
- Input. Specifies the type of action to be taken. Valid values
(defined in db2ApiDf header file, located in
the include directory) are:
- DB2HISTORY_GET_ENTRY
- Get the next entry, but without any command data.
- DB2HISTORY_GET_DDL
- Get only the command data from the previous fetch.
- DB2HISTORY_GET_ALL
- Get the next entry, including all data.
Usage notes
The records that are returned
will have been selected using the values specified in the call to
the db2HistoryOpenScan API.
For a detailed
description of the use of the database history records APIs, refer
to the db2HistoryOpenScan API.