Return specifications

On return to component trace, the start/stop routine must place information in the registers. Component trace takes action based on the return codes set by the routine.

Registers on return: On return to component trace, the start/stop routine must place the following information in the registers:

Register Contents
GPR 0 Reason code, created by the application program, if the return code is not zero.
GPR 1 No requirement.
GPRs 2 - 14 You must restore the contents of these registers.
GPR 15 Return code. On return from a request to start tracing, IBM® recommends you set the return codes as follows:
0
The start/stop routine completed successfully; the routine performed the specified action as requested on the TRACE CT operator command or on CTRACE DEFINE.
4
An option specified in the operator reply is in error. Register 0 contains a unique, user-defined, 4-byte reason code to identify the specific error. The operator can re-issue the command.
8
An environmental error. Register 0 contains a unique, user-defined, 4-byte reason code to identify the specific error.
On return from a request to stop tracing, IBM recommends you set the return codes as follows:
0
Tracing was stopped or set to the minimum level.
Other
An error occurred.
ARs 0 - 15 You must restore the contents of these registers.

Component trace processing after return: If the start/stop routine sets a non-zero return code, the system displays both the return and reason codes through an operator message. For this reason, you should make your return and reason codes as meaningful as possible. The return codes shown in the above table are recommended by IBM.

When issuing CTRACE DEFINE, the application can include the SSRC and SSRSNC parameters to obtain the start/stop routine's return and reason codes.