Work with Job Schedule Entries (WRKJOBSCDE)

The Work with Job Schedule Entries (WRKJOBSCDE) command allows you to work with an entry, entries, or generic entries in the job schedule. Each job schedule entry contains the information needed to automatically submit a batch job once or at regularly scheduled intervals.

This command shows the Work with Job Schedule Entries display. From the display, you can select options to add, change, remove, hold, or release entries. You can display details of an entry, or work with the last job submitted for an entry. You can also select an option to immediately submit a job using the information contained in the job schedule entry.

Start of change

The QSYS2.SCHEDULED_JOB_INFO view returns similar information.

End of change

Restrictions:

  1. To use this command, you must have:
    • Use (*USE) authority to object QDFTJOBSCD, type *JOBSCD, in library QUSRSYS and execute (*EXECUTE) authority to library QUSRSYS.

Parameters

Keyword Description Choices Notes
JOB Job name Generic name, name, *ALL Optional, Positional 1
OUTPUT Output *, *PRINT Optional
PRTFMT Print format *BASIC, *FULL Optional
SEQ Sequence *JOB, *DATETIME, *JOBQ Optional
SCDBY Scheduled by user Name, *ALL Optional
SBMDATE Submit date Date, *ALL, *CURRENT Optional
JOBQ Job queue Single values: *ALL
Other values: Qualified object name
Optional
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB

Job name (JOB)

Specifies the job name of the job schedule entries with which you want to work.

*ALL
All job schedule entries matching this command's other parameter values are shown on the display.
generic-name
Specify the generic name of the job schedule entry. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If a generic name is specified, then all entries with job names that begin with the generic name are displayed. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete job name.
name
Specify the name of the job schedule entry you want to display.

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

*
The output is displayed for interactive jobs or printed with the job's spooled output for non-interactive jobs.
*PRINT
The output is printed with the job's spooled output.

Print format (PRTFMT)

Specifies the format used for the printed output.

*BASIC
The entries are printed in an abbreviated list format.
*FULL
The details of each entry are printed in an expanded format.

Sequence (SEQ)

Specifies the order in which the selected entries are shown.

*JOB
Entries are shown in alphabetical order by job name. Within a job name the entries are ordered by entry number from lowest to highest.
*DATETIME
Entries are ordered by the date and time at which their jobs are scheduled to be submitted, with the earliest entries shown first. Entries that do not have a job scheduled to be submitted are shown last.
*JOBQ
The entries are grouped under the name of the job queue to which their jobs are submitted. The job queues are shown in alphabetical order. Within a job queue, entries are shown in alphabetical order.

Scheduled by user (SCDBY)

Specifies the name of the user who added the entry to be shown.

*ALL
Entries added by all users are shown.
name
Specify the name of the user who added the entries to be shown.

Submit date (SBMDATE)

Specifies the date on which the entries to be shown submit jobs to run.

*ALL
All job schedule entries are shown, regardless of the date on which the entries are to submit a job to run.
*CURRENT
The entries scheduled to submit jobs on the current date are shown.
date
Specify the submit date for the entries to be shown.

Job queue (JOBQ)

Specifies the name of the job queue to which the jobs are submitted. This parameter is used to display all entries that submit jobs to a specified job queue.

Single values

*ALL
All entries are shown, regardless of the job queues.

Qualifier 1: Job queue

name
Specify the name of the job queue.

Qualifier 2: Library

*LIBL
All libraries in the thread's library list are searched until a match is found.
*CURLIB
The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the library where the job queue is located.

Examples

WRKJOBSCDE   JOBQ(QGPL/QBATCH)

This command shows all the job schedule entries that submit a job to the job queue QBATCH in library QGPL.

Error messages

*ESCAPE Messages

CPF1628
Job schedule entry &3 number &4 not found.
CPF1629
Not authorized to job schedule &1.
CPF1630
Not authorized to job schedule entry &3 number &4.
CPF1632
Job schedule entry &3 number &4 damaged.
CPF1637
Job schedule &1 in library &2 in use.
CPF1638
Job schedule entry &3 number &4 in use.
CPF1640
Job schedule &1 in library &2 does not exist.
CPF1641
Job schedule &1 in library &2 damaged.