Writing a CICS online program

Use the following information to decide if an online program is appropriate for your application.

Data that a CICS online program can access

CICS® online programs run in the DBCTL environment and can access IMS full-function databases, Fast Path DEDBs, Db2 for z/OS® databases, and z/OS files.

Online programs that access IMS databases are executed in the same way as other CICS programs.

Using a CICS online program

An online program runs under the control of CICS, and it accesses resources concurrently with other online programs. Some of the application requirements online programs can answer are:

  • Information in the database must be available to many users.
  • Program needs to communicate with terminals and other programs.
  • Programs must be available to users at remote terminals.
  • Response time is important.

The structure of an online program, and the way it receives status information, depend on whether it is a call- or command-level program. However, both command- and call-level online programs:

  • Schedule a PSB (for CICS online programs). A PSB is automatically scheduled for batch or BMP programs.
  • Issue either commands or calls to access the database. Online programs cannot mix commands and calls in one logical unit of work (LUW).
  • Optionally, terminate a PSB for CICS online programs.
  • Issue an EXEC CICS RETURN statement when they have finished their processing. This statement returns control to the linking program. When the highest-level program issues the RETURN statement, CICS regains control and terminates the PSB if it has not yet been terminated.

Because an online application program can be used concurrently by several tasks, it must be quasi-reentrant.

An online program in the DBCTL environment can use many IMS system service requests.

DL/I database or system service requests must refer to one of the program communication blocks (PCBs) from the list of PCBs passed to your program by IMS. The PCB that must be used for making system service requests is called the I/O PCB. When present, it is the first PCB in the list of PCBs.

For an online program in the DBCTL environment, the I/O PCB is optional. To use the I/O PCB, you must indicate this in the application program when it schedules the PSB.

Before you run your program, the program specification blocks (PSBs) and database descriptions (DBDs) the program uses must be converted to internal control block format using the IMS ACBGEN utility. PSBs specify the characteristics of an application program. DBDs specify the physical and logical characteristics of IMS databases.

Related Reading: For more information on performing an ACBGEN and a PSBGEN, see IMS Version 15.5 System Utilities.

Because an online program shares a database with other online programs, it may affect the performance of your online system.