Coding COBOL programs to run under CICS

To code a program to run under CICS, code CICS commands in the PROCEDURE DIVISION by using the EXEC CICS command format.

EXEC CICS command-name command-options
END-EXEC

CICS commands have the basic format shown above. Within EXEC commands, use the space as a word separator; do not use a comma or a semicolon. Do not code COBOL statements within EXEC CICS commands.

In general, the COBOL language is supported in a CICS environment. However, there are restrictions and considerations that you should be aware of when you code COBOL programs to run under TXSeries.

Restrictions:
  • DB2 files that will interoperate with CICS TXSeries must be created with FILEMODE(SMALL) in effect.
  • Object-oriented programming and interoperability with Java are not supported. COBOL class definitions and methods cannot be run in a CICS environment.
  • The source program must not contain any nested programs.
  • COBOL programs that will run under TXSeries must be 32 bit.

Do not use EXEC, CICS, or END-EXEC as variable names, and do not use user-specified parameters to the main program. In addition, it is recommended that you not use any of the following COBOL language elements:

The following COBOL statements are also not recommended for use in a CICS environment:

Apart from some forms of the ACCEPT statement, mainframe CICS does not support any of the COBOL language elements in the preceding list. If you use any of those elements, be aware of the following limitations:

Restriction: There is no System z host data format support for COBOL programs that are translated by the separate or integrated CICS translator and run on TXSeries.