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.
- Use commonly addressable storage:
- Address space common areas
- SCOPE=ALL data spaces
- SCOPE=COMMON data spaces.
- Use a program call (PC) routine
- Schedule a service request block (SRB).
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.
- Obtain common storage to pass the CTSS information. (Consider setting up a permanent area to hold the CTSS information.)
- Copy the CTSS information into this area.
- Post the task that processes the trace requests. (The ECB must be in common storage.)
- Wait for the task to complete.
- Upon being posted with a return code, send the return code back to component trace in register 15.
- Wait for a trace request.
- When posted, move the trace options to private storage.
- Parse any application-unique options if not already done in the start/stop exit routine.
- Process the request to start, stop, or change the trace options.
- Post the start/stop exit with a return code.
- Loop back to wait for the next request.
- Set up a register pointing to the CTSS.
- Issue a PC to the PC routine responsible for processing trace requests.
- Upon return, send the PC routine's return code back to component trace.
- Use access register ASC mode to access the CTSS in the home address space.
- Parse any application-specific options if not already done in the start/stop exit routine.
- Process the request to start, stop, or change the trace options.
- Issue a program transfer (PT) or program return (PR) back to the start/stop exit routine with a return code.
See z/OS MVS Programming: Extended Addressability Guide for further information about PC routines.
- Obtain extended SQA storage for:
- An SRB
- A copy of the CTSS and related control areas
- An ECB.
- Initialize and schedule the SRB (SCHEDULE macro) to the application's address space.
- Wait for the ECB to indicate that the SRB has completed.
- Upon being posted and receiving a return code, send the return code back to component trace.
- Parse the application-unique options.
- Process the request to start, stop, or change the trace options.
- Post the start/stop routine and provide a return code.
See Using a service request block (SRB) for further information.