SQL Programming Manual for TAL
System Procedures
HP NonStop SQL Programming Manual for TAL—527887-001
4-7
SQLCAFSCODE
•
If the error text exceeds output^record^length, the output is wrapped at word
boundaries producing subsequent lines that are 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 prints a warning message that indicates when information is
lost.
A call statement to the SQLCADISPLAY procedure using all default parameters is:
CALL SQLCADISPLAY (SQLCA);
An example of diagnostic messages that SQLCADISPLAY might generate is:
*** 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.
*** Statistics: Rows accessed/affected: 10
*** Estimated cost: 100
SQLCAFSCODE
The SQLCAFSCODE procedure returns either the first or the last error in the SQLCA
structure that was set by the file system, disk process, or NonStop Kernel operating
system. SQLCAFSCODE returns 0 if the requested error does not exist.
error returned value
INT
returns the requested error. Zero (0) indicates this error does not exist.
sqlca^ input
INT .EXT
is a pointer to the SQLCA structure. The TAL compiler automatically declares the
SQLCA structure when you specify the INCLUDE SQLCA directive.
error := SQLCAFSCODE ( sqlca^ ! i
, [ first^flg ] ) ; ! i