Using a utility program
You can use a utility program to help you determine whether a process is stuck or just dormant. CICS® supplies the audit trail utility, DFHATUP, and the repository utility, DFHBARUP, or you can write your own.
CICS-supplied utility programs
CICS supplies two utility programs for diagnostic purposes. The audit trail utility, DFHATUP, and the repository utility, DFHBARUP.
The two utility
programs for diagnostic purposes are detailed here:
- The audit trail utility, DFHATUP
- You
can use DFHATUP to print selected audit records from a log stream.
If you use auditing to track the progress of your processes across
the sysplex, to investigate a stuck process you could print its audit
records.
DFHATUP is described in Creating a BTS audit trail.
- The repository utility, DFHBARUP
- You
can use DFHBARUP to print selected records from a repository. To
investigate a stuck process, you could print its repository records.
DFHBARUP is described in Examining BTS repository records.
User-written utility programs
You can write a utility program that can check for and restart stuck processes, the utility program is most effective when your activities use status containers.
Your utility program could, for
example:
- Browse all processes of a specified process-type.
- Browse the descendant activities of each process returned in step 1.
- Inquire on the status data-container of each activity, and retrieve its contents.
- Identify a stuck activity from the contents of its status container.
- Issue an ACQUIRE command to acquire the stuck activity.
- Issue a CANCEL command to cancel the stuck activity. The completion event for the stuck activity fires, causing its parent to be reactivated. The CHECK ACTIVITY command issued by the parent returns a completion status of FORCED. Ensure that the parent is coded to handle the abnormal completion of one of its children. The process is no longer stuck.