Job user identity
The job user identity (JUID) is the name of the user profile by which this job is known to other jobs. This name is used for authorization checks when other jobs attempt to operate against this job.
Some examples of functions that operate against another job include the Start Service Job (STRSRVJOB) command, the Retrieve Job Information (QUSRJOBI) API, the Change Job (QWTCHGJB) API, all job control commands, and functions that send signals from one job to another.
In situations where jobs swap user profiles, the current user profile identifies the profile under which the initial thread is running instead of the JUID.
The JUID is not used to make authorization checks from within a job. Authorization to perform a function is always based on the current user profile of the thread in which the function is called.
When a job is on a job queue or output queue, the JUID is always the same as the user name of the job and cannot be changed.
When a job starts, and at the start of any subsequent routing steps, the JUID is the same as the name of the current user profile of the job. While a job is active, the JUID can be changed in the following ways.
- The JUID can be explicitly set by an application using the Set Job User Identify (QWTSJUID) application program interface (API) or the QwtSetJuid() function. The JUID is set with the name of the user profile that the thread that called the API or function is running under.
- The JUID can be explicitly cleared by an application using the QWTSJUID API or the QwtClearJuid() function. The job must be running as a single threaded job at the time. When cleared, the JUID is implicitly set by the system to the name of the user profile that the single thread of the job is running under at that point.
- If the job is running as a single threaded job, and the JUID has not been explicitly set by an application, then each time the job uses the Set Profile (QWTSETP) API to run under a different user profile the JUID is implicitly set by the system to the name of the user profile that was set by QWTSETP.
- When a single threaded job initiates a secondary thread and the JUID has not been explicitly set by an application, then the system will implicitly set the JUID with the name of the user profile that the single thread of the job was running under at the point that it initiated the secondary thread.
When the job returns to a single thread, the system implicitly sets the JUID to the name of the user profile that the single thread of the job is running under at that point.
Parent topic:
Job characteristicsRelated concepts
Proper authority