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

IMS Application Programming Structure


IMS provides support for writing application programs to access the IMS database.

The structure of an IMS application program is different from that of a Non-IMS application program. An IMS program cannot be executed directly; rather it is always called as a subroutine. An IMS application program consists of Program Specification Blocks to provide a view of the IMS database.

The application program and the PSBs linked to that program are loaded when we execute an application program which includes IMS DL/I modules. Then the CALL requests triggered by the application programs are executed by the IMS module.

ims-application-programming-flow-diagram

The principal DL/I message call function codes are:

The GU, or get unique call. This call must be used to retrieve the first, or only, segment of the input message.

The GN, or get next call. This call must be used to retrieve second and subsequent message segments.

The ISRT, or insert call. This call must be used to insert an output message segment into the output message queue. Note: these output message (s) will not be sent until the MPP terminates or requests another input message via a get unique.

The CHNG or change destination call. This call can be used to set the output destination for subsequent insert calls

IMS distinguishes the following types of transactions.

  • Non-response transactions.

  • Response transactions.

  • Conversational transactions.

These IMS transaction characteristics are defined for each transaction during IMS system definition.

With non-response transactions, IMS accepts multiple input messages (each being a transaction) from a terminal without a need for the terminal to first accept the corresponding output message, if any.

With response transactions, IMS will not accept further transaction input from the terminal before the corresponding output message is sent and interpreted by the user.

For conversational transactions, which are always response transactions IMS provides a unique scratch pad area (SPA) for each user to store information across successive input messages.



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