You can categorize your trace entries and control which entries
your application will create by setting up user-defined options. The
operator then specifies these options on the REPLY operator command,
or the options can be in one or more parmlib members. For example,
you might have one option for trace entries that identify unusual
events, another option for trace entries that trace the flow of control,
and other options for trace entries that represent specific functions
within the application. You decide what to call these options, and
you can set up flags in your control information to correspond to
each option.
To understand how to set up and use options, consider the following
example:
- Decide on five options, and name them as follows:
- ERRORS for unusual events
- FLOW for events that trace flow of control
- FUNC1 for events representing "function 1" in your program
- FUNC2 for events representing "function 2" in your program
- FUNC3 for events representing "function 3" in your program.
- Set up flags in your control information to correspond to these
options. You might call them FLAG_ERRORS, FLAG_FLOW, FLAG_FUNC1,
FLAG_FUNC2, and FLAG_FUNC3.
- If a problem occurs, you might decide to have the operator turn
tracing on with two of the options, ERRORS and FLOW. The operator
then indicates ERRORS and FLOW as the options on the REPLY operator
command. (You can also do this through a parmlib member.)
- The system places the options ERRORS and FLOW into the parameter
list it passes to the start/stop exit routine.
- The start/stop exit routine parses the options and sees that ERRORS
and FLOW were specified.
- The start/stop exit routine turns on FLAG_ERRORS and FLAG_FLOW
in the control information.
- The application checks the control information. Because FLAG_ERRORS
and FLAG_FLOW are both on, the application creates those trace entries
that correspond to options ERRORS and FLOW.