SCHEDULED_JOB_INFO view
The SCHEDULED_JOB_INFO view returns information that can also be seen through the Work with Job Schedule Entries (WRKJOBSCDE) command interface. Each job schedule entry contains the information to automatically submit a batch job once or at regularly scheduled intervals.
Authorization: No authority is required to access scheduled job rows, but some columns return NULL if you don't have the required authority. You must have *JOBCTL special authority or be the user profile listed in the SCHEDULED_BY column to see the data in all columns.
The following table describes the columns in the view. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
SCHEDULED_JOB_ENTRY_NUMBER | ENTRYNO | INTEGER | The number assigned to the job schedule entry when the entry is added to the job schedule. |
SCHEDULED_JOB_NAME | SCDJOBNAME | VARCHAR(10) | The name of the job schedule entry. This is the simple job name portion of the fully qualified job name used when the job is submitted. It is also used to identify the job schedule entry through change, hold, release and remove functions. |
SCHEDULED_DATE_VALUE | SCDDATEV | VARCHAR(14) | Indicates the date on which the
job is scheduled to be submitted.
|
SCHEDULED_DATE | SCDDATE | DATE Nullable
|
The date on which the job is scheduled
to be submitted. Contains the null value if the SCHEDULED_DATE_VALUE column is not SCHEDULED_DATE. |
SCHEDULED_TIME | SCDTIME | TIME | The time when the job is scheduled to be submitted on the scheduled date. |
SCHEDULED_DAYS | SCDDAYS | VARCHAR(34) Nullable
|
The days on which the job is submitted
if a specific date is not specified. The value is a comma separated string with any or all of the values: *MON *TUE *WED *THU *FRI *SAT *SUN. The single value of *ALL can be returned to represent all seven values. Contains the null value if SCHEDULED_DATE_VALUE is not SCHEDULED_DAYS. |
FREQUENCY | FREQUENCY | VARCHAR(8) | How often the job is to be submitted.
|
RELATIVE_DAYS_OF_MONTH | RELDAYSMON | VARCHAR(13) Nullable
|
Specifies which occurrence during
the month (for the days listed in the SCHEDULED_DAYS column) the job
is scheduled to be run. The value is a comma separated string with
up to five of the following values:
Contains the null value if the FREQUENCY column does not have a value of MONTHLY or SCHEDULED_DAYS is null. |
RECOVERY_ACTION | RECOVERY | VARCHAR(7) | The recovery action taken when
the system is powered down or in the restricted state at the time
a job is scheduled to be submitted.
|
NEXT_SUBMISSION_DATE | NXTSUBDATE | DATE Nullable
|
The next date that the job scheduling
process is scheduled to submit this job. Contains the null value if the job is not scheduled to be submitted again. |
STATUS | STATUS | VARCHAR(9) | The status of the job schedule
entry.
|
JOB_QUEUE_NAME | JOBQ | VARCHAR(10) | The job queue to which the job is scheduled to be submitted. Can contain the special value of *JOBD, meaning that the job is submitted to the job queue specified in the job description listed in the JOB_DESCRIPTION_NAME and JOB_DESCRIPTION_LIBRARY_NAME columns. |
JOB_QUEUE_LIBRARY_NAME | JOBQLIB | VARCHAR(10) Nullable
|
The library containing the job
queue. Contains the null value if JOB_QUEUE_NAME is *JOBD . |
JOB_QUEUE_STATUS | JOBQSTATUS | VARCHAR(10) Nullable
|
The status of the job queue.
Contains the null value if JOB_QUEUE_NAME is *JOBD, if the job queue is not found or is damaged, or if the information is not available. |
DATES_OMITTED | OMITDATES | VARCHAR(219) Nullable
|
A comma separated string with up
to 20 dates in *ISO format indicating dates when the job will not
be scheduled to run. Contains the null value if no dates were specified to omit or if the information is not available. |
SCHEDULED_BY | CREATEDBY | VARCHAR(10) | The user profile of the job which added the entry to the job schedule. |
DESCRIPTION | TEXT | VARCHAR(50) Nullable
|
The descriptive text for the job
schedule entry. Contains the null value if the job schedule entry has no description. |
COMMAND_STRING | COMMAND | VARCHAR(512) Nullable
|
The command that is run in the
submitted job. Contains the null value if the information is not available. |
USER_PROFILE_FOR_SUBMITTED_JOB | SBMJOBUSR | VARCHAR(10) Nullable
|
The user profile to be used when
the job is submitted. Can contain the special value *JOBD to indicate
that the user profile from the job description is used. Contains the null value if the information is not available. |
JOB_DESCRIPTION_NAME | JOBD | VARCHAR(10) Nullable
|
The job description used when the
job is submitted. Can contain the special value of *USRPRF to indicate
that the job description specified in the user profile under which
the submitted job runs is used. Contains the null value if the information is not available. |
JOB_DESCRIPTION_LIBRARY_NAME | JOBDLIB | VARCHAR(10) Nullable
|
The library containing the job
description. Contains the null value if JOB_DESCRIPTION_NAME has a value of *USRPRF or if the information is not available. |
MESSAGE_QUEUE_NAME | MSGQ | VARCHAR(10) Nullable
|
The name of the message queue where
the messages for this job schedule entry are sent. Can contain the
special value *USRPRF to indicate that the message queue specified
in the user profile under which the submitted job runs is used. Contains the null value is no specific message queue is associated with this job schedule entry or if the information is not available. |
MESSAGE_QUEUE_LIBRARY_NAME | MSGQLIB | VARCHAR(10) Nullable
|
The library containing the message
queue. Contains the null value if MESSAGE_QUEUE_NAME is null, contains the special value of *USRPRF, or if the information is not available. |
LAST_SUCCESSFUL_SUBMISSION_
TIMESTAMP |
SBMTIMSTMP | TIMESTAMP(0) Nullable
|
The timestamp when a batch job
was last successfully submitted for the job schedule entry. Contains the null value if the job schedule entry has not been used to submit a job. |
LAST_SUCCESSFUL_SUBMISSION_JOB | LASTSBMJOB | VARCHAR(28) Nullable
|
The qualified job name used when
this scheduled job was last submitted. Contains the null value if the scheduled job has never been submitted or if the information is not available. |
LAST_ATTEMPTED_SUBMISSION_
TIMESTAMP |
ATTSBMTIM | TIMESTAMP(0) Nullable
|
The timestamp when this scheduled
job was last submitted. Contains the null value if the scheduled job has never been submitted or if the information is not available. |
LAST_ATTEMPTED_SUBMISSION_STATUS | SBMJOBSTS | VARCHAR(68) Nullable
|
The status from when this scheduled
job was last submitted. Values are:
Contains the null value if the scheduled job has never been submitted or if the information is not available. |
KEEP_ENTRY | KEEP | VARCHAR(3) Nullable
|
Whether the job schedule entry
is kept or removed after the job has been submitted.
Contains the null value when the FREQUENCY column does not contain *ONCE or if the information is not available. |
Example
SELECT * FROM QSYS2.SCHEDULED_JOB_INFO WHERE STATUS IN ('HELD', 'SAVED')
ORDER BY SCHEDULED_BY;