Saturday, 24 August 2013

DB2 Data Types for GET DIAGNOSTICS Items Returning Statement Information

The data types for the GET DIAGNOSTICS items that return statement information. The various GET DIAGNOSTIC statements can provide useful and informative information for application communication.
Item
Description
Data Type
DB2_GET_DIAGNOSTICS _DIAGNOSTICS
After a GET DIAGNOSTICS statement, if any error or warning occurred, contains all the diagnostics as a single string
VARCHAR (32672)
DB2_LAST_ROW
After a multiple-row FETCH statement, contains a value of +100 if the last row in the table is in the row set that was returned.
INTEGER
DB2_NUMBER_PARAMETER_MARKERS
After a PREPARE statement, contains the number of parameter markers in the prepared statement.
INTEGER
DB2_NUMBER_RESULT_SETS
After a CALL statement that invokes a stored procedure, contains the number of result sets that are returned by the procedure.
INTEGER
DB2_NUMBER_ROWS
After an OPEN or FETCH statement for which the size of the result table is known, contains the number of rows in the result table. After a PREPARE statement, this item contains the estimated number of rows in the result table for the prepared statement. For SENSITIVE DYNAMIC cursors, this item contains the approximate number of rows.
DECIMAL (31,0)
DB2_RETURN_STATUS
After a CALL statement that invokes an SQL procedure, contains the return status if the procedure contains a RETURN statement.
INTEGER
DB2_SQL_ATTR _CURSOR_HOLD
After an ALLOCATE or OPEN statement, indicates whether the cursor can be held CHAR(1) open across multiple units of work (Y or N).
CHAR(1)
DB2_SQL_ATTR _CURSOR_ROWSET
After an ALLOCATE or OPEN statement, indicates whether the cursor can use row set positioning (Y or N).
CHAR(1)
DB2_SQL_ATTR _CURSOR_SCROLLABLE
After an ALLOCATE or OPEN statement, indicates whether the cursor is scrollable (Y or N).
CHAR(1)
DB2_SQL_ATTR _CURSOR_SENSITIVITY
After an ALLOCATE or OPEN statement, indicates whether the cursor shows updates made by other processes (sensitivity A, I, or S).
CHAR(1)
DB2_SQL_ATTR _CURSOR_TYPE
After an ALLOCATE or OPEN statement, indicates whether the cursor is declared static (S for INSENSITIVE or SENSITIVE STATIC) or dynamic (D for SENSITIVE DYNAMIC).
CHAR(1)
MORE
After any SQL statement, indicates whether some condition items were discarded because of insufficient storage (Y or N).
CHAR(1)
NUMBER
After any SQL statement, contains the number of condition items. If no warning or error occurred or if no previous SQL statement has been executed, the number 1 is returned.
INTEGER
ROW_COUNT
After DELETE, INSERT, UPDATE, or FETCH, contains the number of rows deleted, inserted, updated, or fetched. After PREPARE, contains the estimated number of result rows in the prepared statement.
DECIMAL (31,0)


Created with Artisteer

No comments:

Post a Comment