![HP NonStop SQL/MP Programming Manual Download Page 193](http://html.mh-extra.com/html/hp/nonstop-sql-mp/nonstop-sql-mp_programming-manual_165149193.webp)
Error and Status Reporting
HP NonStop SQL/MP Programming Manual for C—429847-008
9-13
Returning Performance and Statistics Information
Returning Performance and Statistics
Information
NonStop SQL/MP returns performance and statistics information to the SQL statistics
area (SQLSA) after the execution of these DML statements:
An INSERT, UPDATE, or DELETE statement
A SELECT statement with the INTO clause for a host variable
An OPEN, CLOSE, or FETCH statement for a cursor operation that has a SELECT
statement specified in the DECLARE CURSOR statement
For dynamic SQL operations, NonStop SQL/MP returns information in the SQLSA
structure for these statements:
Each PREPARE statement, including information about input parameters, output
columns, and the length of the input and output names buffer
Each DESCRIBE statement, including information about input parameters, output
columns, the names buffer, and the collation buffer
Each DESCRIBE INPUT statement, including information about input parameters,
output columns, and the names buffer
The SQLSA structure is undefined after the execution of a DSL, DDL, DCL, or
transaction control statement.
An SQL statement resets the SQLSA values. If you use an SQLSA value elsewhere in
a program, save the value in a variable immediately after the statement runs. To
monitor statistics for a cursor, declare accumulator variables for the required values
and add the SQLSA values to the accumulator variables after each FETCH statement
runs. (In some cases, you can also declare more than one SQLSA structure.)
Declaring the SQLSA Structure
To declare an SQLSA structure, specify the INCLUDE SQLSA directive using this
syntax:
Using the SQLSA Structure
Follow these guidelines when you use the information in an SQLSA structure:
To generate a version 300 or later SQLSA structure, first specify an INCLUDE
STRUCTURES directive with the version of the SQLSA structure you require.
Otherwise, NonStop SQL/MP generates version 2 SQL structures by default.
EXEC SQL INCLUDE SQLSA;
Summary of Contents for NonStop SQL/MP
Page 4: ......
Page 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Page 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Page 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...