Options to view thread information

The Display Job (DSPJOB), Work with Job (WRKJOB), and Work with Active Jobs (WRKACTJOB) commands allow you to display and work with threads associated with an i5/OS™ job.

Through each of these commands, you can select an option that allows you to display or work with the threads in the job. You can use the Work with Threads display to view the following information for the job:
  • List of threads:

    This display shows all of the threads that are currently associated with the job. The first thread in the list is the initial thread in the process. An eight-digit number (Thread) identifies threads by their identifier. This list changes depending on the thread activity in the job. Other information about this display includes the thread's status of active or waiting, total CPU usage, total auxiliary storage I/O counts, and thread run priority.

  • Thread call stack option:

    This option displays the call stack of any thread. In some conditions, typically when the thread is running an instruction that cannot be interrupted, the call stack cannot be displayed. In these cases, a message indicates that no stack information is available is displayed.

  • Thread mutual exclusions (mutexes) option:

    This option allows you to see all mutexes associated with a specific thread. This includes mutexes that are held and the mutex for which the thread might be waiting. If the specified thread has no mutexes that are associated with it, the Job or thread has no mutexes message is displayed.

  • Thread locks option:

    This option allows you see all the thread-scoped object locks held by the thread. It also allows you to see all pending process-scoped locks and thread-scoped locks on which the the thread is waiting. If the specified thread has no object locks associated with it, the Thread has no locks message is displayed.

  • Hold thread option:

    This option allows you to temporarily suspend the running of a specific thread. This option is useful if you suspect that a thread might be looping or causing some other system problem. You must use the Hold thread option in conjunction with the Release thread option. Unlike Hold Job (HLDJOB), repeated Hold thread requests are cumulative. To resume the running of a held thread, you must issue the equivalent number of Release thread requests.

  • Release thread option:

    This option is used to resume the running of a thread that has been suspended.

  • End thread option:

    This option allows you to end a specific thread. In general, you should not use of this option because it can cause unpredictable results. This option requires *SERVICE special authority.

The Release Job (RLSJOB), Hold Job (HLDJOB), End Job (ENDJOB), and End Job Abnormal (ENDJOBABN) commands affect all threads within a multithreaded job. No commands are planned to provide the equivalent thread-level support.