Start a job trace

This action starts a job trace for one or more jobs. You can start any number of trace sessions, but active trace session identifiers must be unique across the system.
Note: If you have not identified the job that needs to be traced, use the server table as a reference in identifying jobs and their corresponding servers.

To start a job trace, follow these steps:

  1. At the command line, type STRTRC (Start Trace), and press F4 (Prompt).
  2. For the Session ID prompt, specify a meaningful session identifier, such as mytrace. You will use this session identifier later, to specify the trace you want to end or print.
  3. For the Jobs parameter, you need to specify values for these three prompts. Remember that you cannot specify the value *ALL for all three of these prompts. At least one of the prompts must contain a value other than *ALL.
    • For the Jobs, Job Name prompt, choose one of these options:
      • To trace only the job that issued the Start trace (STRTRC) command, type * .
      • To trace a specific job, specify the name of the job you want to trace, such as job. You can specify up to ten jobs.
      • To trace a set of jobs that all begin with the same string, specify the job name in a manner such that it is not a specific job, such as job*. This traces all jobs that begin with the prefix JOB. See Start multiple generic traces to find out different ways to format a generic job trace.
      • To trace all the jobs, type *ALL. However, tracing all jobs is not recommended.
    • For the Jobs, User prompt, specify the name of the user of the job, such as USER. Other valid values include USER* and *ALL. However, tracing all users is not recommended.
    • For the Jobs, Number prompt, type *ALL or the job number. If you type *ALL, the Job Name prompt specification is considered a generic job name.
  4. For the Thread ID to include prompt, type *ALL unless you want to trace a specific thread.
  5. For the Maximum storage to use prompt, specify a value that you think will be large enough to collect the trace information you need. The amount of storage used for the trace buffer depends on how long the trace runs and how busy the job being traced is. The default value is 10000 KB (10 MB).
  6. For the Trace full prompt, type *WRAP or *STOPTRC, depending on what you want to happen when the trace buffer gets full. If you want to collect trace information until the problem occurs, type *WRAP; the older trace information is overlaid with newer trace information when the buffer is full. If you do not want the trace information to be overlaid, type *STOPTRC.
  7. For the Trace type prompt, type *ALL to store all of the job trace data.
  8. For the Trace type: Component prompt, type *SOCKETS.
  9. For the Trace type: Trace level, specify *VERBOSE.
  10. For the Trace filter prompt, type *NONE. If you want to use a filter to collect specific information in the trace, specify the name of the trace filter, such as tracefiltername. If you have not already created a trace filter, do so by using the Add Trace Filter (ADDTRCFTR) command. The trace filter applies to the *FLOW trace only.
  11. Press Enter. You should receive the message STRTRC session ID MYTRACE successfully started. If you meet problem with configuration or starting or ending servers, you can specify *TCPIPCFG, checking whether your configuration is right.
Related reference
Server table
Multiple generic traces