Start/stop exit routine communications

The start/stop exit routine runs either in a system address space or the address space of the caller of CTRACE DEFINE. When a TRACE CT operator command causes the start/stop exit to run, the routine runs in a system address space. If a CTRACE DEFINE causes the start/stop exit to run, either through a parmlib member specified on CTRACE DEFINE or through a parmlib member with the PRESET option, the routine runs in the caller's address space.

In either case, the routine might have to communicate with another address space to make the trace options effective. The following methods to accomplish this are described in this information:

Using commonly addressable storage: If the application doing the tracing does not have its own address space, then it can maintain its trace options in commonly addressable storage. The start/stop routine can copy the desired options from the CTSS to the application-maintained trace control area in commonly addressable storage.

Applications that do have their own address space can attach a permanent task to process trace requests. When the start/stop exit routine gets control, it could do the following:
The task that processes the trace requests could do the following:
Using a PC routine: The application can implement a space-switching PC to get addressability to the correct address space. In this case, the start/stop exit routine could do the following:
The PC routine responsible for processing trace requests could do the following:

See z/OS MVS Programming: Extended Addressability Guide for further information about PC routines.

Scheduling an SRB: The application can schedule an SRB to get addressability to the correct address space. In this case, the start/stop exit routine could do the following:
The SRB routine could do the following:

See Using a service request block (SRB) for further information.