Using multiple traces

Component trace allows an application to have more than one trace associated with it. For example, if your application runs in multiple address spaces with multiple tasks in each address space, you could define different traces to represent each address space, and different traces to represent each task in an address space. Applications that have complex logic, with several subtasks, or those that run in multiple address spaces, are good candidates for multiple traces. While multiple traces might appear to use more resources, multiple traces can actually trace more efficiently than single traces, depending on the application.

With multiple traces, called sublevel traces, you can:
  • Better control which events are to be traced.
  • More easily control and change trace options.
  • Capture less frequent trace events, which in single traces might be overwritten by frequent trace events.
  • Improve performance because less overhead is required to get addressability to the trace buffers.
  • Avoid special serialization of trace buffers, because each trace uses its own trace buffers. Less serialization requires fewer instructions, again contributing to improved performance.
  • Set up unique traces with specific options for each function in your application.

For applications that run multiple traces you might want to create special trace entries that can be used to tie the multiple traces together. IPCS supports the merging of multiple traces.

For information about coding the CTRACE macro to set up multiple traces for your application, see z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN.