In general, the coding for your 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.
To communicate with DB2, do these steps:
related concepts
DB2 coprocessor
COBOL and DB2 CCSID determination
related tasks
Coding SQL statements
Compiling with the SQL option
Choosing the DYNAM or NODYNAM compiler option
related references
Differences in how the DB2 precompiler and coprocessor behave