SQLCA
SQLCA is a SQL communication area where DB2 sends the program the results of the SQL execution. Every time a SQL query is executed, a set of variables called SQLCA is modified. One SQLCA may be provided by a program that contains SQL statements that can be executed, but not more.
It merely informs the program of the success or failure of the execution. Under SQLCA, a number of predefined variables exist, including SQLCODE, which holds the error code. The SQLCODE value ‘000’ denotes a successful execution.
The syntax to declare SQLCA in the Working Storage section is as follows:
Syntax:
EXEC SQL
INCLUDE SQLCA
END-EXEC.
Database Interface in COBOL
Programs in COBOL communicate with the DB2 Database. Data Base2 is DB2, and it was created by IBM. The database is a relational one. The relational information is kept in the TABLE format, which consists of multiples of rows and attributes (Columns).
DB2 is generally used for storing sizable amounts of Mainframe application data. It is comparable to SQL but has several enhanced features.
The following terms are part of the COBOL vocabulary for the Database Interface:
- Embedded SQL
- DB2 Application Programming
- Host Variables
- SQLCA
- SQL Queries
- Cursors
Contact Us