Using application trace on looping tasks

For this scenario the assumption is that you are running the Tivoli Enterprise Portal from your computer and a transaction (FTRN) has been running for several minutes.

The task seems to be in an interval control wait situation, but the task is using some central processing unit (CPU) in a particular CICS Region (CICSR32L).

This transaction has previously been known to use more than normal CPU consumption across a couple of CICS regions and transactions during an observation session. Using the Tivoli Enterprise Portal and the Transaction Analysis workspace you can first identify the region with a problem and then you can locate the task that is using the consumption.

These are the stages involved in this procedure:
  • Using the Transaction Analysis workspace to monitor the transaction for the (CICSR32L) region.
  • Using a Take Action command to enable Application Trace for the task.
  • Refreshing the workspace to use the Application Trace dynamic workspace link to see what the task is doing
  • Viewing the Application Trace workspace to determine a course of action
Use these steps, to identify looping tasks:
  1. On your computer, open the Tivoli Enterprise Portal and access the Transaction Analysis workspace in the Navigator view.

    From the Transaction Analysis workspace, you identify that the FTRN transaction in the Transaction ID column for the CICSR32L region in the CICS Region Name column has been running for several minutes, but is in a wait period, but still using CPU consumption. The Resource Type column signifies ICWAIT. See Transaction Analysis workspace.

  2. In the Transaction Analysis table view, select and right-click the FTRN transaction.
  3. Click Take Action from the menu.

    The Take Action window opens.

  4. From the Take Action window, select the Sample Trace Task command from the Name column. See Sample Trace Task command.
  5. Select the CICSR32L CICS region from the Destination Systems area, and click OK.

    The Action Status window opens showing a return code of zero. The application trace for the FTRN transaction is enabled.

  6. Refresh your workspace (F5). Select the FTRN transaction and right-click and select Application Trace from the dynamic link menu.

    The Application Trace workspace opens.

  7. From the Application Trace workspace, you can observe what the task is doing. See Application Trace workspace.

In this case, you see that the transaction is constantly reading a file that is not open. You see that all the reads are originating from the same offset in the application program. At this point, you determine, if opening the file, or canceling the task, is the appropriate course of action. You can also correct the logic in your application program given the information provided by the application trace for the transaction.

You can also use the application trace feature from your OMEGAMON for CICS (3270) interface.

To use the OMEGAMON for CICS (3270) for application trace use these steps:
  1. From the OMEGAMON for CICS (3270) interface, on the Task Details session for the CICSR32L CICS region, zoom on the Application Trace - Inactive line, for the FTRN transaction on the Transaction ID line to activate application trace.

    The Task Application Trace Status session opens.

  2. From the Task Application Trace Status session, you see that the status is inactive. Overtype the Inactive line, with ACT.

    The Task Details session opens.

  3. The Task Details session indicates that Application Trace is Active. Zoom on the Application Trace - Active line to see the details for the application trace for the FTRN transaction.

    The Transaction Detail for FTRN session opens listing the transaction details in the Application Trace Facility grouping.