WRKJOBJS (Work with Jobs using Job Scheduler)

Note: To use this command, have the 5722-JS1 (Job Scheduler for iSeries) licensed program installed.

WRKJOBJS Command syntax diagram

 

Purpose

The Work with Jobs using Job Scheduler (WRKJOBJS) command allows you to work with a single job, groups of jobs or all jobs that you have set up in Job Scheduler. You can sequence the display by job, by date or by group.

When you select jobs that you want to work with, you are taken to the Work with Jobs display. From this display you can perform most job related functions.

Note: When referring to a job in this command, we are referring to an entry in Job Scheduler. An entry in Job Scheduler is a user-defined name for commands or programs that you want to process at scheduled times and dates. Job Scheduler jobs (entries) are not OS/400 objects.

 

Optional Parameters

JOB
Specifies that you want to work with a single job, a generic group of jobs or all jobs. You can specify a single job with generic group, all jobs with a single group and so on.

Element 1: Job

*ALL: Work with all jobs that meet the other parameter specifications.

generic*-job-name: Specify the generic name of the jobs that you want to work with. A generic name is a character string that contains one or more characters followed by an asterisk (*). If an * is not specified with the name, the system assumes that the name is a complete job.

job-name: Specify the name of the job that you want to work with.

Element 2: Group

*ALL: All groups to which the specified job or jobs are a member are displayed included in the Work with Jobs display.

*NONE: There is no group associated with the job or jobs.

generic*-group-name: Specify the generic name of the group that you want to work with. A generic name is a character string that contains one or more characters followed by an asterisk (*). If an * is not specified with the name, the system assumes that the name is a complete group.

group-name: Specify the name of the group that contains the job or jobs that you want to work with.

Element 3: Group sequence

*ALL: All sequence numbers for the specified group or groups are included in the Work with Jobs display.

*NONE: There is no sequence number associated with the job.

group-sequence-number: Specify the sequence number of the job within the group or groups that you want to work with. Sequence numbers can range from 1 to 99.

APP
Specifies the name of the application that you want to work with.

*ALL: All the application entries that meet this command's other parameter values are shown on the Work with Jobs display.

*NONE: The job is not assigned to an application.

generic*-application-name: Specify the generic name of the application. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If the generic name is specified, then all entries with application 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 application name.

application-name: Specify the user-defined name of the application you want to work with.

SCDCDE
Specifies the schedule code that you want to work with.

*ALL: All the schedule code entries that meet this command's other parameter values are shown on Work with Jobs display.

*DAILY: The job or jobs that you want to work with are scheduled to run using the *DAILY schedule code.

*CALENDAR: The job or jobs that you want to work with are scheduled to run using the *CALENDAR schedule code.

*DATE: The job or jobs that you want to work with are scheduled to run using the *DATE schedule code.

*DAY: The job or jobs that you want to work with are scheduled to run using the *DAY schedule code.

*NUMDAY: The job or jobs that you want to work with are scheduled to run using the *NUMDAY schedule code.

*MINUTES: The job or jobs that you want to work with are scheduled to run using the *MINUTES schedule code.

*ONCE: The job or jobs that you want to work with are scheduled to run using the *ONCE schedule code.

*MONTHEND: The job or jobs that you want to work with are scheduled to run using the *MONTHEND schedule code.

*FIRST: The job or jobs that you want to work with are scheduled to run using the *FIRST schedule code.

*SECOND: The job or jobs that you want to work with are scheduled to run using the *SECOND schedule code.

*THIRD: The job or jobs that you want to work with are scheduled to run using the *THIRD schedule code.

*FOURTH: The job or jobs that you want to work with are scheduled to run using the *FOURTH schedule code.

*FIFTH: The job or jobs that you want to work with are scheduled to run using the *FIFTH schedule code.

*LAST: The job or jobs that you want to work with are scheduled to run using the *LAST schedule code.

*FIRSTWRK: The job or jobs that you want to work with are scheduled to run using the *FIRSTWRK schedule code.

*LASTWRK: The job or jobs that you want to work with are scheduled to run using the *LASTWRK schedule code.

*DEPJOB: The job or jobs that you want to work with are scheduled to run using the *DEPJOB schedule code.

*ALTERNATE: The job or jobs that you want to work with are scheduled to run using the *ALTERNATE schedule code.

*TEMP: The job or jobs that you want to work with are temporary jobs, created as a result of processing the SBMJOBJS command.

*NONE: The job does not have a schedule code. Subordinate job groups do not have their own schedule codes.

CAL
Specifies the name of the calendar that you want to work with.

*ALL: All the calendar entries that meet this command's other parameter values are shown on the Work with Jobs display.

*NONE: The jobs that you are working with do not have a calendar.

generic*-calendar-name: Specify the generic name of the calendar. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If the generic name is specified, then all entries with calendar 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 calendar name.

calendar-name: Specify the user-defined name of the calendar you want to work with.

HDYCAL
Specifies the name of the holiday calendar that you want to work with.

*ALL: All the holiday calendar entries that meet this command's other parameter values are shown on the Work with Jobs display.

*NONE: A holiday calendar is not assigned to the job.

generic*-holiday-calendar-name: Specify the generic name of the holiday calendar. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If the generic name is specified, then all entries with holiday calendar 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 holiday calendar name.

holiday-calendar-name: Specify the user-defined name of the holiday calendar you want to work with.

FSCCAL
Specifies the name of the fiscal year calendar that you want to work with.

*ALL: All the fiscal calendar entries that meet this command's other parameter values are shown on the Work with Jobs display.

*NONE: A fiscal calendar is not assigned to the job.

generic*-fiscal-calendar-name: Specify the generic name of the fiscal calendar. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If the generic name is specified, then all entries with fiscal calendar 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 fiscal calendar name.

fiscal-calendar-name: Specify the user-defined name of the fiscal calendar you want to work with.

RMTLOCNAME
Specifies the location and network identification of the remote location name that created the job entry that you want to work with.

*ALL: Selects all job entries for all systems in the network.

*LCL: Selects all job entries for the local system.

*JOBCTL: Selects all job entries for the default system.

remote-location-name: Specify the name of the location associated with the system whose job entries you want to work with.

network-ID.location-name: Specify the network identifier and the name of the location associated with the system. Specify these values using the format nnnnnnnn.cccccccc where nnnnnnnn is the network identifier and cccccccc is the location name.

RPTDSTID
Specifies the identifier of the report distribution names that you want to work with.

*ALL: All the report distribution ID's that meet this command's other parameter values are shown on the Work with Jobs display.

*NONE: You do not want to include any jobs with report distribution IDs in the display.

report-distribution-ID: Specify the report distribution ID that you want to work with.

STATUS
Specifies the completion status of the jobs that you want to want to work with.

*ALL: Include all jobs regardless of completion status in the Work with Jobs display.

*READY: Include only jobs whose job status is *READY in the Work with Jobs display. Jobs with job status *READY are jobs that are waiting to be processed at their next scheduled date and time.

*HELD: Include only those jobs whose job status is *HELD in the Work with Jobs display. Jobs with job status *HELD are jobs that have been suspended and will not be processed until released.

*PROCESS: Include only those jobs whose job status is *PROCESS in the Work with Jobs display. Jobs with job status *PROCESS are jobs that are currently processing at the time of the display.

*JOBQ: Include only those jobs whose job status is *JOBQ in the Work with Jobs display. Jobs with job status *JOBQ are jobs that are on the job queue at the time of the display.

*SAVED: Include only those jobs whose job status is *SAVED in the Work with Jobs display. Jobs with job status *SAVED are jobs that are one time jobs that you have saved for future use.

TEXT
Specifies the text related to the job with which you want to work. You can search for any string of characters, and only those job schedule entries that contain the string of characters in the text are included in the Work with Jobs display.

*ALL: You want to work with all job schedule entries, regardless of the text.

*NONE: You want to work with all job schedule entries that have blanks or *NONE for text.

generic*-text: Specify generic text. For example, specifying "THE JOB*" would cause all text that begins with the words "THE JOB" to be included in the display or report.

print-text: Specify that you want to work with all job schedule entries that have the text string specified.

CMD
Specifies the command request for the jobs that you want to work with. You can include any command request, a string of command characters, or work with entries that have no command request.

*ALL: You want to work with all job schedule entries, regardless of whether they have a command request.

*NONE: You want to work with all job schedule entries that have no command request.

*generic*-command-request: Specify generic command information. For example, specifying "CALL PG*" would cause all command requests that begins the string "CALL PG" to be included in the display.

command-request: Specify the command request for the job that you want to work with.

SEQ
Specifies the sequence in which you want to work with the selected job schedule entries.

*JOB: You want to work with the job schedule entries in job sequence.

*DATE: You want to work with job schedule entries in date sequence.

*GROUP: You want to work with job schedule entries in group sequence.

Example for WRKJOBJS

Example 1: Work with Jobs in Date Sequence

WRKJOBJS SCDCDE(*DAILY) STATUS(*READY)
SEQ(*DATE)

In this example all jobs are included in the Work with Jobs display that have a schedule code of *DAILY and a status code of *READY. The display is presented in date sequence.

Error messages for WRKJOBJS

None