Evaluate SQL Commands:
To use a SQl Code “SQLCA” system defined members must be copied under working (storage section by using copy member name.
- SQL code is DB2 supplied variable, which will contain system-defined numeric number generated by SQL statements, when they are executed.
- SQL code contains 00 indicates success full.
- SQL code contains 100 indicates Row not found (end of the table or empty table)
- Every SQL statement must be evaluated with IF/EVALUATE statement immediate after SQL Statement.
To use a SQl Code “SQLCA” system defined members must be copied under working (storage section by using copy member name.
Syntax:
WORKING STORAGE SECTION
COPY SQLCA
01 SQLCA
02 SQLCODE PIC S9(4) COMP.
02 SQLSTATE PIC X(1).
EXEC SQL
WORKING STORAGE SECTION
COPY SQLCA
01 SQLCA
02 SQLCODE PIC S9(4) COMP.
02 SQLSTATE PIC X(1).
EXEC SQL
ConversionConversion EmoticonEmoticon