Application programming on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


Targeting COBOL programs for certain environments

Application programming on z/OS

COBOL programs can run in CICS®, DB2®, and IMS™ environments.

COBOL programs for CICS

COBOL programs that are written for CICS can run under CICS Transaction Server. CICS COBOL application programs that use CICS services must use the CICS command-level interface.

COBOL programs for a DB2 environment

In general, the structure of your COBOL program is the same whether or not you want it to access a DB2 database. However, to retrieve, update, insert, and delete DB2 data, you must:
  • Connect to a data server.
  • Execute SQL statements. SQL statements must begin with EXEC SQL and end with END-EXEC.
  • Disconnect from the data server.
To prepare the program for execution, follow one of these procedures:
  • Precompile, compile, link, and bind the program.
  • Compile the program with the SQL option, and then link and bind the program.

COBOL programs for IMS

With Enterprise COBOL, you can invoke IMS facilities using the following interfaces:

  • AIBTDLI
  • AERTDLI
  • CBLTDLI call
  • Language Environment® callable service CEETDLI

You can also run object-oriented COBOL programs with IMS dependent regions that support Java™. You can mix the object-oriented COBOL and Java languages in a single application.





Copyright IBM Corporation 1990, 2010