Job control block trace
The job control block (JCB) trace is one of most useful diagnosis tools for any application problem that might occur. The trace is an easy way to determine the last five calls that were issued, and what their return codes were.
Analyzing the JCB trace
Analyzing the JCB trace is a good way to identify application problems. For example, sometimes the application programmer forgets to handle a certain status code, even though it identifies an error situation. Seeing the call and its return code draws attention to this application error and makes it easier to resolve.
The JCB trace is always on (you
do not need to do anything to turn it on), and is included in every IMS dump. The job control block portion
of the dump is formatted under the heading, JCB.
The JCB trace is a wrap-around area that consists of six 2-byte entries.
The first entry begins at the offset of JCBTRACE in the JCB portion
of the dump and is followed immediately by the remaining five entries.
As the entries are inserted into the trace area, previous entries
are shifted left.
In the first through fifth entries, the first byte identifies the DL/I call. The second byte in these entries contains the second character of the DL/I I/O status code (return code). The sixth entry contains information about the call that immediately preceded the call that was being processed when the abend occurred; this information can be useful in determining what occurred prior to the failure. The function of that prior call is identified in field JCBPREVF of the JCB, and the status code of the prior call is in field JCBPREVR.
If one of the 2-byte fields in the JCB trace contains X'0000', no call was made.
Example JCB trace
0000 0000 0205 0305 0140 0140
This trace indicates that only four calls were made, the most recent
of which was a get-unique call (either GU or GHU),
as indicated by the first-byte code of X'01'. The status code for
the most recent call was X'40'.