CICS

 View Only

 How to get control back from DFHPIRT instead of APIB abend.

Wayne Murray's profile image
Wayne Murray posted 08/28/25 11:28 AM

Hi,

I have a CICS SOAP application that sends a SOAP message by calling DFHPIRT as follows.

EXEC CICS LINK PROGRAM('DFHPIRT') CHANNEL('SOAP_SEND')

                              RESP(PV-RESP)

                              RESP2(PV-RESP2)

END-EXEC.

Occasionally the web application specified via the DFHWS-URI container on the channel is not up and this causes a connection failure and DFHPIRT terminates with an APIB abend.

Is there a way to get DFHPIRT to return control to my program instead of abending so I can reroute the message?

I could use a HANDLE ABEND but was hoping for something more elegant.

Thanks,

Wayne Murray 

Ian Mitchell's profile image
Ian Mitchell

Hi Wayne - I've just seen this question and you've probably gone with the HANDLE ABEND option for now.

The RESP/RESP2 on the LINK can't tell you what happened inside of DFHPIRT - they provide generic LINK command error outcomes. The INVOKE SERVICE command is our favoured way to do all of this and would provide the proper RESP/RESP2 to allow you to work with the errors without the abend.

If you can't convert to the better option of INVOKE SERVICE (am I dropping a heavy enough hint here? ;-) ), then https://www.ibm.com/docs/en/cics-ts/6.x?topic=applications-creating-xml-aware-service-requester-application describes use of a DFHWS-NOABEND container as input to the LINK and then the DFHERROR container will tell you the outcome.