#include <qp0wpid.h> int Qp0wGetJobID(pid_t pid, QP0W_Job_ID_T *jobinfo);
The Qp0wGetJobID() function returns the qualified job name and internal job identifier for the process whose process ID matches pid.
The structure qp0w_job_id_t is defined in the <qp0wpid.h> header file as follows:
typedef struct QP0W_Job_ID_T { char jobname[10]; char username[10]; char jobnumber[6]; char jobid[16]; } QP0W_Job_ID_T;
The members of the qp0w_job_id_t structure are as follows:
char jobname[10] | The name of the job as identified to the system.
For an interactive job, the system assigns the job the name of the work station
where the job started. For a batch job, you specify the name in the command
when you submit the job. |
char username[10] | The user name under which the job runs. The user
name is the same as the user profile name and can come from several different
sources, depending on the type of job. |
char jobnumber[6] | The system-generated job number. |
char jobid[16] | The internal job identifier. This value is sent
to other APIs to speed the process of locating the job on the system. The
identifier is not valid following an initial program load (IPL). If you attempt
to use it after an IPL, an exception occurs. |
The process calling Qp0wGetJobID() must have the appropriate authority to the process whose job number is to be returned. A process is allowed to access the job number for a process if at least one of the following conditions is true:
0 | Qp0wGetJobID() was successful. | ||||||
value | Qp0wGetJobID() was not
successful. The value returned indicates one of the following errors. Under
some conditions, value could indicate an error other than those listed
here.
|
Top | UNIX-Type APIs | APIs by category |