Threads

The term thread is shorthand for "thread of control". A thread is the path taken by a program while running, the steps performed, and the order in which the steps are performed. A thread runs code from its starting location in an ordered, predefined sequence for a given set of inputs.

The use of threads within a job allows many things to be done at once. For example, while a job is processing, a thread may retrieve and calculate data needed by the job to finish processing

Every active job has at least one thread, which is called an initial thread. The initial thread is created as part of starting the job. In the threads on iSeries™ Navigator, by default, you will see Initial as the type of the first thread in the list. The initial thread is the first thread created within the job when it starts.

Thread types

The thread type determines how the thread was created on the system.
User
The thread can be created by the customer application. The initial thread in a job is always a user thread. The Allow multiple threads field must be set to yes for multiple user threads to be used.
System
The thread is created by the system on behalf of the user. Some system functions use system threads to complete processing. If a customer's application uses a system function that uses threads, system threads are used.
Related tasks
View thread properties
View threads running under a specific job
End or delete threads
Related information
Example: End a thread using Java
Thread management APIs