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

IMS Purge Call


When your program terminates, or reaches a commit point, output messages are sent to their destination. At times, a program may need to send messages through another PCB (usually an alternate PCB) to different destinations before reaching a commit point. In this situation, you can use the PURG call to tell IMS when each message is complete and to send it to its destination. You can now issue other ISRT calls to the same TP PCB. An example of a PURG call is shown in below code.

Note : The PURG call can only be used for TP PCBs.

PL/I:

CALL PLITDLI (C_PARM2,
              C_PURG_FUNC,
              L_IO_PCB_PTR);

COBOL:

CALL 'CBLTDLI' USING C-PARM2,     *optional parameter*
                     C-PURG-FUNC,
                     L-IO–PCB.

Purge call to I/O PCB

The PURG call can also be used to ISRT a new message. If you increment the parameter count by 1 and add an output message area after the PCB pointer (or PCB mask in COBAL). IMS will issue the PURG call and issue an ISRT call with the specified output message area. Because it does an ISRT call for you, you can add the optional MOD name to the call as the last parameter. Increment the parameter count by a further 1.



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