SQL/MP Programming Manual for C
SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for C—429847-008
5-7
SQLCADISPLAY
out_fcb_2
specifies the second output file control block if SIO is enabled. To use
out_fcb_2, assign it a value greater than 0.
The default is Enscribe I/O.
Additional considerations for the SQLCADISPLAY procedure are:
NonStop SQL/MP returns errors as negative numbers and warnings as positive
numbers. Therefore, you might accordingly need to modify your program.
If there is no text for an error number, NonStop SQL/MP displays this message:
No error text found.
If you receive this message, the version of the SQL message file might be invalid.
To determine the version of the SQL message file, use the SQLCI ENV command
and check the version specified by MESSAGEFILEVSRN.
If the error text exceeds output_record_length, the output is wrapped at word
boundaries producing subsequent lines indented 5 spaces.
The SQLCA can contain a maximum of 7 errors and 180 bytes of text of the actual
parameters returned to the program. Any information that exceeds these limits is
lost. SQLCADISPLAY displays a warning message that indicates when information
is lost.
This example calls the SQLCADISPLAY procedure using default parameters:
#include <cextdecs (SQLCADISPLAY)>
...
/* Variable declarations: */
...
EXEC SQL INCLUDE STRUCTURES SQLCA VERSION 300;
EXEC SQL INCLUDE SQLCA;
...
/* Error handling function: */
...
void handle_errors(void)
{
SQLCADISPLAY( (short *) &sqlca);
...
}
This example shows diagnostic messages the SQLCADISPLAY procedure might
generate:
*** WARNING from SQL [100]: Record not found or end of file
*** encountered on table \SYS1.$VOL1.SALES.ODETAIL.
*** SQLCA display of SQL statement at: SCAN.#201.1 process
\SYS1.$B
*** Error detected within SQL executor at: EXE_EXEC.#450
*** ERROR from SQL [-8408]: Division by zero occurred.