| Overview of Embedded SQL
SQL and COBOL communication through host variables. Connecting your application to SQL/DS. Error and result codes available in the SQLCA. The SQL WHENEVER statement to check error and result codes. Testing SQLCA fields via code in your program. |
| The Procedure Division
Opening and closing files versus SQL/DS tables. The SQL CONNECT statement. The SQL SELECT INTO statement. Host variables in the SELECT statement and WHERE clause. Use and coding of host variables. Referential constraint considerations. |
| The Data Division
Declaring host variables in Working Storage or the Linkage Section via the SQL DECLARE statement. Host structures and the SQLCA in Working Storage. Declaring the SQLCA via the SQL INCLUDE statement. |
| Error Handling
The SQLCODE field to determine statement execution. Additional fields in the SQLCA with error-related information. Coding and use of the WHENEVER statement for error checking. Procedural checking of the SQLCA fields. |