SQL Execution Validation
A program that includes SQL statements needs to have an area set apart for communication with DB2—an SQL communication area (SQLCA). When DB2 processes a SQL statement in a program, it places return codes in the SQLCODE and SQLSTATE host variables or corresponding fields of the SQLCA.
The return codes indicate whether the statement executed succeeded or failed. Because the SQLCA is a valuable problem-diagnosis tool, it is a good idea to include the instructions necessary to display some of the information contained in the SQLCA in your application programs. For example, the contents of SQLERRD(3)—which indicate the number of rows that DB2 updates, inserts, or deletes—could be useful. If SQLWARN0 contains W, DB2 has set ...
Get DB2® Universal Database for OS/390® Version 7.1 Certification Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.