TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB IMS-DC Tools Articles Forum Quiz Interview Q&A

IMS Online Communication

The online communication will be done by DL/I through the I/O PCB. Communicating with a terminal device is not different from communicating with a database. Instead of processing data from a database, you will be processing messages from a message queue. IMS provides for three methods of processing: Data Base (DB), Data Communication (DC), and DB/DC, which is a combination of the two. Each is explained in detail below.

Data Base Processing:

The example below shows an IMS application program using only the DB portion of IMS. In this case, the program accesses IMS databases and only requires the DB functions of IMS. This is typical of IMS batch applications.

IMS Data Base (Batch Programs)


The application program also has access to OS files with this type of processing.

Data Communications Processing:

The example below shows an IMS application program using only the DC portion of IMS. In this case, the program accesses only the IMS message queues, and only requires the DC portion of IMS.

Note: Even though the application program only uses the DC portion of IMS, it cannot be installed without another data base management system (DBMS) such as DB2.

The application program does not have access to OS or data bases files with this type of processing.

Combination Processing:

The example below shows an IMS application program using the DB and DC portions of IMS. This is the most frequently used method of processing for online IMS programs. Typically, you will use the DC portion to communicate with the client, and the DB portion to gather the data to present information back to the client.

IMS DB/DC-MPP and Batch Message Processing Programs

Note: A BMP application program can access OS files. The MPP application program cannot access OS files.

Input/Output Program Communication Block:

Typically, the data in an IMS database is reported from, and updated by, what is considered a batch-processing environment. Many clients, however, require reports and updates more frequently than the cyclical batch processing can provide. IMS was also designed with this need in mind. IMS provides for an interactive immediate access to the physical data. This is the Data Communications (DC) part of IMS.

The I/O PCB provided by IMS that allows your program to process messages is not coded in your PSB. Instead, IMS assumes that because this is a message-processing program, the first PCB pointer, (or for COBOL, the first parameter on the using statement) is for the I/O PCB or the message queue. Any need to access other online IMS resources will require will require the coding of a Tele Processing (TP) PCB in the PSB and as a result, the addition of the pointer or parameter in the application program. These TP PCBs must be coded in the PSB before any database PCBs.

Accessing resources other than databases was introduced in the environment section, when it was stated that a physical device was the originating point of most IMS messages. In addition, physical devices that did not create a message can be accessed. Accessing other physical devices, such as a printer or a different LTERM, is similar to how you process messages from the message queue. The easiest way to think of accessing these resources is to consider the other resource as another message queue. These other message queues are called alternate I/O PCB’S and will be discussed in a subsequent section.

Below code shows how the I/O, and data base PCB pointers are coded in an application program.


OLPGM: PROC (L_IO_PCB_PTR,    <----- I/O PCB Pointer
             L_DB1_PCB_PTR,   <----- Data Base PCB Pointer
              L_DBn_PCB_PTR) 	<----- Data Base PCB Pointer
              OPTIONS (MAIN);


                       L-DB1-PCB,   <-----   Data Base PCB
                       L-DBn-PCB.   <-----   Data Base PCB 

Application Program PCB Specification

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on IBMMainframer Community!

Are you looking for Job Change? Job Portal