DB2 Application Programming
The guidelines to follow when writing COBOL-DB2 software are as follows:
- Between EXEC SQL and ENDEXEC, each SQL statement needs to be encapsulated.
- AREA B is where SQL statements must be coded.
- The INCLUDE statement in the Working-Storage section must define each and every table in the program.
- Except for INCLUDE and DECLARE TABLE, all SQL statements must appear in the Procedure Division.
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