Programming for a Db2 environment
In general, the coding for a COBOL program will be the same if you want the program to access a Db2® database. However, to retrieve, update, insert, and delete Db2 data and use other Db2 services, you must use SQL statements.
About this task
To communicate with Db2, do these steps:
- Code any SQL statements that you need, delimiting them with
EXEC SQL
andEND-EXEC
statements. - Either use the Db2 stand-alone precompiler, or compile with
the
SQL
compiler option and use the Db2 coprocessor.