Data Movement Utilities Guide and Reference
Checks the status of a load operation during processing.
Authorization
None
Required Connection
Database
Version
db2ApiDf.h
C API Syntax
/* File: db2ApiDf.h */
/* API: Load Query */
/* ... */
SQL_API_RC SQL_API_FN
db2LoadQuery (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca *pSqlca);
typedef struct
{
db2Uint32 iStringType;
char * piString;
db2Uint32 iShowLoadMessages;
db2LoadQueryOutputStruct * poOutputStruct;
char * piLocalMessageFile;
} db2LoadQueryStruct;
typedef struct
{
db2Uint32 oRowsRead;
db2Uint32 oRowsSkipped;
db2Uint32 oRowsCommitted;
db2Uint32 oRowsLoaded;
db2Uint32 oRowsRejected;
db2Uint32 oRowsDeleted;
db2Uint32 oCurrentIndex;
db2Uint32 oNumTotalIndexes;
db2Uint32 oCurrentMPPNode;
db2Uint32 oLoadRestarted;
db2Uint32 oWhichPhase;
db2Uint32 oWarningCount;
} db2LoadQueryOutputStruct;
/* ... */
|
Generic API Syntax
/* File: db2ApiDf.h */
/* API: Load Query */
/* ... */
SQL_API_RC SQL_API_FN
db2GenLoadQuery (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca *pSqlca);
typedef struct
{
db2Uint32 iStringType;
db2Uint32 iStringLen;
char * piString;
db2Uint32 iShowLoadMessages;
db2LoadQueryOutputStruct * poOutputStruct;
db2Uint32 iLocalMessageFileLen;
char * piLocalMessageFile
} db2LoadQueryStruct;
typedef struct
{
db2Uint32 oRowsRead;
db2Uint32 oRowsSkipped;
db2Uint32 oRowsCommitted;
db2Uint32 oRowsLoaded;
db2Uint32 oRowsRejected;
db2Uint32 oRowsDeleted;
db2Uint32 oCurrentIndex;
db2Uint32 oNumTotalIndexes;
db2Uint32 oCurrentMPPNode;
db2Uint32 oLoadRestarted;
db2Uint32 oWhichPhase;
db2Uint32 oWarningCount;
} db2LoadQueryOutputStruct;
/* ... */
|
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 db2LoadQueryStruct
structure.
- pSqlca
- Output. A pointer to the sqlca structure. For more
information about this structure, see the Administrative API
Reference and the SQL Reference.
- iStringType
- Input. Specifies a type for piString. Valid values
(defined in db2ApiDf.h) are:
- DB2LOADQUERY_TABLENAME
- Represents specifying a table name for use by the db2LoadQuery
API.
- iStringLen
- Input. Specifies the length in bytes of piString.
- piString
- Input. Specifies a temporary files path name or a table name,
depending on the value of iStringType.
- iShowLoadMessages
- Input. Specifies the level of messages that are to be returned by
the load utility. Valid values (defined in
db2ApiDf.h) are:
- DB2LOADQUERY_SHOW_ALL_MSGS
- Return all load messages.
- DB2LOADQUERY_SHOW_NO_MSGS
- Return no load messages.
- DB2LOADQUERY_SHOW_NEW_MSGS
- Return only messages that have been generated since the last call to this
API.
- poOutputStruct
- Output. A pointer to the db2LoadQueryOutputStruct
structure, which contains load summary information. Set to NULL if a
summary is not required.
- iLocalMessageFileLen
- Input. Specifies the length in bytes of
piLocalMessageFile.
- piLocalMessageFile
- Input. Specifies the name of a local file to be used for output
messages.
- oRowsRead
- Output. Number of records read so far by the load utility.
- oRowsSkipped
- Output. Number of records skipped before the load operation
began.
- oRowsCommitted
- Output. Number of rows committed to the target table so far.
- oRowsLoaded
- Output. Number of rows loaded into the target table so far.
- oRowsRejected
- Output. Number of rows rejected from the target table so
far.
- oRowsDeleted
- Output. Number of rows deleted from the target table so far (during
the delete phase).
- oCurrentIndex
- Output. Index currently being built (during the build
phase).
- oCurrentMPPNode
- Output. Indicates which node is being queried (for MPP mode
only).
- oLoadRestarted
- Output. A flag whose value is TRUE if the load operation
being queried is a load restart operation.
- oWhichPhase
- Output. Indicates the current phase of the load operation being
queried. Valid values (defined in db2ApiDf.h)
are:
- DB2LOADQUERY_LOAD_PHASE
- Load phase.
- DB2LOADQUERY_BUILD_PHASE
- Build phase.
- DB2LOADQUERY_DELETE_PHASE
- Delete phase.
- oNumTotalIndexes
- Output. Total number of indexes to be built (during the build
phase).
- oWarningCount
- Output. Total number of warnings returned so far.
REXX API Syntax
This API can be called from REXX through the SQLDB2 interface. See
the Application Development Guide. For a description of the syntax, see LOAD QUERY Command.
Sample Programs
- C
- \sqllib\samples\c\loadqry.sqc
- COBOL
- \sqllib\samples\cobol\loadqry.sqb
- FORTRAN
- \sqllib\samples\fortran\loadqry.sqf
Usage Notes
This API reads the status of the load operation on the table specified by
piString, and writes the status to the file specified by
pLocalMsgFileName.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]