If a CHECK ACTIVITY command returns a completion status (COMPSTATUS) of ABEND, you can use the INQUIRE ACTIVITYID command to obtain further information about how the activity abended. For example:
If status = DFHVALUE(ABEND)
.
To get the activity-identifier of the failed child,
start a browse of child activities
EXEC CICS STARTBROWSE ACTIVITY
BROWSETOKEN(root-token)
RESP(data-area) RESP2(data-area) END-EXEC
.
EXEC CICS GETNEXT ACTIVITY(child-name)
BROWSETOKEN(root-token)
ACTIVITYID(child-id)
RESP(data-area) RESP2(data-area) END-EXEC
.
loop until the failed child is found by name
EXEC CICS GETNEXT ACTIVITY(child-name)
BROWSETOKEN(root-token)
ACTIVITYID(child-id)
RESP(data-area) RESP2(data-area) END-EXEC
.
end child activity browse loop
Inquire on the failed child, using its activity-identifier
EXEC CICS INQUIRE ACTIVITYID(child-id)
ABCODE(data-area)
ABPROGRAM(data-area)
RESP(data-area) RESP2(data-area) END-EXEC
This example returns the name of the program in which the abend occurred, together with the corresponding CICS® abend code.