Trace points are the locations in the application's code where
the system will create trace entries. You must decide where these
trace points will be. Some choices are:
- Module entry
- Module exit
- Start of a functional request
- Major checkpoints in the process of completing a request
- Completion of a functional request
- Interface to another system function
- Interface to the same application on another system
- Any unusual event, such as a detected I/O error or entry to a
recovery routine.
You must also decide what information to record in the trace entries,
which can hold a variable amount of data. The following are suggestions
on the types of data you might place in the trace entries:
- Identification of the unit of work or transaction that is being
serviced by the application. This can be the ASID, JOBNAME, USERID,
task control block (TCB), service request block (SRB), or transaction
identifier.
- For entries that trace the flow of control, the caller's return
address.
- For entries that trace the start of a functional request, the
input parameters.
- For internal checkpoints, an identification that ties this trace
entry to the original request, and information on the current status
of the process.
- For unusual events, the cause of the problem and any additional
data. For example, you could record a system completion (abend) code
and reason code for entry to a recovery routine.
- On return from a service, the return code and reason code (consider
having a separate identifier for recording return codes that indicate
errors).
- For trace entries being used for analysis rather than as a debugging
aid, whatever information the user of the application needs.