Handling Abnormal Terminations (ABNDPROC)
The ABNDPROC program is responsible for handling abnormal terminations (ABENDs) in the system. It logs ABEND records to a VSAM file named ABNDFILE. The program starts by displaying a message indicating its initiation, processes the data passed through DFHCOMMAREA, writes the data to ABNDFILE, checks the write response, and finally returns control to CICS.
The ABNDPROC program starts by displaying a start message, then it processes the data passed to it, writes this data to a file, checks if the write was successful, and finally returns control to the system.
Lets' zoom into the flow:
Display 'Started ABNDPROC:'
First, the program displays the message 'Started ABNDPROC:' to indicate the start of the ABNDPROC process.
D DISPLAY 'Started ABNDPROC:'.
Display 'COMMAREA passed='
Next, it displays the contents of DFHCOMMAREA
D DISPLAY 'COMMAREA passed=' DFHCOMMAREA.
Move DFHCOMMAREA to WS-ABND-AREA
WS-ABND-AREA
Then, the contents of DFHCOMMAREA
WS-ABND-AREA
MOVE DFHCOMMAREA TO WS-ABND-AREA.
Write to ABNDFILE
The program writes the contents of WS-ABND-AREA
ABNDFILE
EXEC CICS WRITE
FILE('ABNDFILE')
FROM(WS-ABND-AREA)
RIDFLD(ABND-VSAM-KEY)
RESP(WS-CICS-RESP)
RESP2(WS-CICS-RESP2)
END-EXEC.
Check Write Response
If the write operation is not successful (WS-CICS-RESP
DFHRESP(NORMAL)
IF WS-CICS-RESP NOT= DFHRESP(NORMAL)
DISPLAY '*********************************************'
DISPLAY '**** Unable to write to the file ABNDFILE !!!'
DISPLAY 'RESP=' WS-CICS-RESP ' RESP2=' WS-CICS-RESP2
DISPLAY '*********************************************'
EXEC CICS RETURN
END-EXEC
END-IF.
Display 'ABEND record successfully written to ABNDFILE'
If the write operation is successful, a success message is displayed along with the contents of WS-ABND-AREA
D DISPLAY 'ABEND record successfully written to ABNDFILE'.
D DISPLAY WS-ABND-AREA.
Perform GET-ME-OUT-OF-HERE
GET-ME-OUT-OF-HERE
Finally, the program performs the GET-ME-OUT-OF-HERE
PERFORM GET-ME-OUT-OF-HERE.
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human