SQL Programming Manual for Pascal
NonStop SQL System Procedures
HP NonStop SQL Programming Manual for Pascal—528614-001
4-8
SQLCAGETINFOLIST
first-flag input
INT16
specifies whether the first or the last error is set in the SQLCA. You can set
first-flag as follows:
Guidelines
•
If the SQLCA is full when a file-system error occurs, the error is lost and cannot be
returned by SQLCAFSCODE.
•
Use SQLCAFSCODE to get the NonStop Kernel operating system and file-system
error codes that occur for SQL operations. You can then determine the action to
take, depending on the NonStop Kernel operating system or file-system error
rather than on the SQL errors generated.
Example
The following code obtains the last error returned by the file system, NonStop Kernel
operating system, or the disk process. Note that the XADDR function is used to
facilitate type matching between the SQLCA parameter and the formal type EXTADDR.
VAR FS_ERROR : INT16;
WHICH_ERROR : INT16;
...
WHICH_ERROR := -1;
FSERROR := SQLCAFSCODE (XADDR(SQLCA), WHICH_ERROR);
IF FS_ERROR = 0 THEN { proceed }
ELSE { perform error processing code } ;
SQLCAGETINFOLIST
The SQLCAGETINFOLIST procedure saves the error or warning information that
NonStop SQL returns to the program.
The SQLCAGETINFOLIST procedure stores the information in a structure you define.
You specify a list of numbers, called item codes, to select this information. The
information can come from these subsystems or system components:
•
NonStop SQL
•
FASTSORT program (SORTPROG process)
•
Sequential I/O (SIO) procedures
•
File system
•
NonStop Kernel operating system
nonzero value (or omitted) First error
0 Last error