Communication with IMS


As discussed in earlier sections, IMS database is accessed through the Data Language Interface ( i.e. DLI). The DLI interface can be invoked in one of two ways:

  • Making a call to IBM supplied program CBLTDLI / ASMTDLI / PLITDLI by Passing a PCB/Passing an AIB.
  • Invoking the EXEC-DLI CICS interface by Passing a PCB/Passing an AIB

Using CBLTDLI:


DLITCBL stands for DL/I to COBOL. The entry statement is used to define the entry point in the program. CALL statement used to request for DL/I services in COBOL on the IMS database. The syntax for the call would be like below.

Syntax -


>CALL ‘CBLTDLI’ USING PARM-COUNT 
				    FUNCTION 
				    PCB 
				    IO-AREA 
 				    SSA.

The application program passes these PARMs to IMS by providing details on what action needs to be performed on IMS DB.

Parm-count:


Provides information about how many parameters follow in the CALL request. A 4-byte binary field.

01 PARM-COUNT   PIC S9(8) COMP

Function:


Provides information about what type of call to make. Also used identifies the DL/I function to be performed. The argument length is 4 characters. In other words, used to describe the I/O operation to be performed.

PCB:


Provides the information about database on what the operations needs to be performed. And also provides information about from where the information has return from IMS.

The PCB definition inside the Linkage Section is called as PCB Mask. They are used in the entry statement. No SELECT, ASSIGN, OPEN, or CLOSE statements are required.

IO-AREA:


Provides information to IMS where to find the data for IO operations. i.e. place the data (for retrieval) and where to find the data(for updates). In other words, name of an input/output work area used for IO operations.

SSA:


Segment Search Arguments used to push IMS to correct segment by supplying details such as segment name and key values.SSA parameters are optional parameters. SSA parameters required depending on the type of the call issued.They are used to search data segments inside the IMS database.