Collecting the traces - IBM-CICS

The Change of Address scenario is probably the most complex of the various application scenarios as it involves at least three components across two platforms:

a. CICS on System z

  • Acts as the service provider
  • Runs the ‘back end’ program
  • Interacts with DB2 on System z
  • Writes a message to a WebSphere MQ queue

b. WebSphere Message Broker on System z

  • A message flow detects a message from CICS
  • WMB publishes this message to subscriber message queues

c. WebSphere Message Broker on Windows

  • A message flow detects a message from WMB on its subscription queue
  • Initiates a Web service call in CICS for retrieval of information

We say at least three components because we choose not to trace WebSphere MQ flows, as these are fairly straightforward and well indicated in the WebSphere Message Broker and CICS traces. We recommend tracing WMQ if suspected problems with messaging existed.

1. Tracing the Web service on CICS

The tool of choice for tracing CICS transactions is the Auxiliary trace. The auxtrace is highly configurable and simple to use. To start and configure the CICS auxtrace, use the CICS Trace Control Facility. This is provided with the CETR transaction. Figure shows the options we used to start the trace.

CETR Transaction

CETR Transaction

The relevant options in CETR are as follows:
Auxiliary Trace Status - Over-type the choice to start or stop the trace.

Auxiliary Trace Dataset - here the dataset is specified. There are two auxiliary trace datasets that CICS uses. They are defined and created using the job DEFTRCDS with the DD names DFHAUXT for the ‘A’ dataset and DFHBUXT for the ‘B’ dataset.

Auxiliary Switch Status - specifies whether CICS should switch to the other dataset when the current becomes full.

You can filter certain CICS component trace points. As we are interested in CICS Web services, we chose to specify special tracing for the CICS Domains: EI (Exec Interface), WB (Web) and PI (Pipeline Manager). Use the following steps to achieve this:

  • In CETR, select PF4=Components.
  • Specify a trace level of two for each of the components EI, WB and PI by over-typing the ‘1’ in the Standard column with ‘2’.
  • Press ENTER=Change to save, and then PF3=Quit.

Formatting the Trace

After the tracing stops, use the DFHTU640 utility to extract all or selected trace entries and to format the data. We used the job in Example to format our data. We use the TYPETR option to extract trace entries that we are interested in, and we also specify ABBREV to extract abbreviated, one line for each trace entries.

Example: The Trace Utility program DFHTU640

2. Tracing the Message Broker flow on distributed platforms

Collecting a user trace for the WebSphere Message Broker on distributed platforms including Windows follows this set of commands:

  • To start the trace:
    mqsichangetrace -u -e -l
  • To stop the trace:
    mqsichangetrace -u -e -l none
  • To extract the trace data:
    mqsireadlog -u -e -o
  • To format the trace data:
    mqsiformatlog -i -o

For this particular trace we use the User Trace menu option in the broker toolkit to set the broker trace levels. Do this from the Broker Administration perspective in the Domains pane.

Setting the trace level in the broker toolkit

Setting the trace level in the broker toolkit

This is equivalent to setting the trace level using the following command:
mqsichangetrace AJGBROKER1 -u -e WSTest -l debug

We stopped the trace using the broker toolkit and ran the following commands to extract and format the trace:
mqsireadlog AJGBROKER1 -u -e WSTest -o WSTest.xml
mqsiformatlog -i WSTest.xml -o WSTest.txt

3. Tracing the Message Broker flow on System z

Running traces on a System z broker is similar to the previous section. We have the option of using the toolkit as above or using an MVS operator command:

However, we found entering the command using SDSF resulted in the WSTest being converted to upper case, resulting in an error due to undefined execution group.

We found that the sequence of steps documented above for collecting a trace on distributed platforms (including Windows) can be run unchanged in a batch UNIX System Services job. For example to start the trace we submitted the JCL in Example.

Example: Broker Commands Batch job

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status