Abend processing

You can use this pseudocode example to process your 3270 transaction abends.

If the 3270 transaction ends abnormally, an abend call is made to the bridge exit. This call occurs at the end of the transaction - it cannot be used to implement an abend handler.

If it is necessary for the exit program to reply to the client, it cannot do so by issuing a PUT CONTAINER command. Because BTS activities are always recoverable, the command would be backed out. One solution is for the exit program to write a message to an unrecoverable transient data or temporary storage queue. It could, for example, delegate this task to a child activity.

The following example contains pseudocode for dealing with an abend of the 3270 transaction. The Requestor activity is a child of the bridge exit; it handles the abend.

Bridge exit program
Abend.
encode abend-in-buffer from 3270-msg-out-buffer
EXEC CICS DEFINE ACTIVITY ('Requestor')
TRANSID('ABE1')
RESP(data-area) RESP2(data-area) END-EXEC.
EXEC CICS PUT CONTAINER('Abend')
ACTIVITY('Requestor')
FROM(abend-in-buffer)
RESP(data-area) RESP2(data-area) END-EXEC.
EXEC CICS LINK ACTIVITY('Requestor')
RESP(data-area) RESP2(data-area) END-EXEC.
EXEC CICS CHECK ACTIVITY('Requestor')
COMPSTATUS(status) ABCODE(a)
RESP(data-area) RESP2(data-area) END-EXEC
If status NOT = DFHVALUE(NORMAL)
EXEC CICS ABEND ABCODE(a)
NODUMP
RESP(data-area) RESP2(data-area) END-EXEC.
End-If..
EXEC CICS RETURN END-EXEC
Requestor activity
WHEN DFH-Initial
EXEC CICS GET CONTAINER('Abend')
INTO(msg-in-buffer)
RESP(data-area) RESP2(data-area) END-EXEC.
decode msg-in-buffer
output a message to a non-recoverable
TD or TS queue.
EXEC CICS RETURN END-EXEC

The exit program issues a LINK ACTIVITY, rather than a RUN ACTIVITY SYNCHRONOUS, command to activate the Requestor activity. This is necessary because the child must execute in the same unit of work as the exit program.

Transaction restart

The 3270 bridge does not support transaction restart. If a client activity is restarted and tries to reuse a bridge facility token, an ABRH abend occurs.


dfhp9c0054.html | Timestamp icon Last updated: Monday, 5 June 2017