WRKHSTJS (Work with History using Job Scheduler)
Note: To use this command, have the 5722-JS1 (Job Scheduler for iSeries) licensed program installed.
WRKHSTJS Command syntax diagram
Purpose
The Work with History using Job Scheduler (WRKHSTJS) command allows you to work with job completion history based on specified completion status, date ranges and sequences. The Work with History using Job Scheduler command takes you to the Work with History display which shows the job information, last run information and completion status for jobs based on the parameters you have selected in the WRKHSTJS command.
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 the name of the job or jobs that you want to work with. You can specify a group and associated sequence numbers for the jobs whose history you want to work with. You can sequence the display by job, by date or by group. When you press Enter, you are taken to the Work with History display where you can perform various actions on the selected job history information.
Element 1: Job
*ALL: You want to work with Job Scheduler history for all jobs that meet the criteria specified in the command.
generic*-job-name: Specify a generic job. For example, specifying JOB* would cause all jobs whose names begin with JOB to be included in the Work with History display.
job-name: Specify the name of the job you want to work with.
Element 2: Group
*ALL: You want to work with Job Scheduler history for all jobs that are members of any group.
*NONE: The job is not a member of a group.
generic*-group-name: Specify a generic job. For example, specifying GROUP* would cause all groups whose names begin with GROUP to be included in the Work with History display.
group-name: Specify the name of the group you want to work with.
Element 3: Group sequence
*ALL: All sequence numbers should be included in the jobs that you want to work with.
*NONE: The job does not have a sequence number.
group-sequence-number: Specify the sequence number of the job that you want to work with. Sequence numbers can range from 1 to 99.
- STATUS
- Specifies the completion status for the last time that the job ran.
You can enter multiple values for this parameter. If you are on an entry display and you need additional entry fields to enter these multiple values, type a plus sign (+) in the entry field opposite the phrase "+ for more", and press the Enter key.
*ALL: Include all jobs in the display regardless of completion status.
*NORMAL: The job came to normal end of job completion.
*ABNORMAL: The job completed abnormally. The Job Scheduler log can be used to determine why the job ended abnormally.
*ABNGRP: The group ended abnormally. This completion status applies to all jobs in the group that did not process because a previous job group did not run successfully.
*SBMERROR: The job did not run successfully because there was an error in the job submission. An example of a submission error would be a job submitted by a user who did not have the proper authority to submit the job.
*PROCESS: The job is currently in process on the system.
*JOBQ: The job is currently in the job queue waiting for processing.
*CANCELLED: The job was canceled prior to its completion.
*RESET: The job was manually reset.
- PERIOD
- Specifies the time period used to select history entries to be included in the display. This parameter contains two lists of two elements each.
Element 1: Beginning Time
One of the following is used to specify the starting creation time at which or after history entries are included. Any history entries made before the specified time and date are not included in the display.
*AVAIL: Any time that is available for the beginning date is included.
begin-time: Specify the beginning time for the specified beginning date that indicates which history entries are to be included.
Element 2: Beginning Date
One of the following is used to specify the starting date on or after which the history entries must have been made. Any entries made before the specified date are not included in the display.
*BEGIN: History entries from the beginning of the history information are included.
*CURRENT: History entries with a current date creation date and between the specified beginning and ending times (if specified) are displayed.
begin-date: Specify the beginning date. The date must be specified in the job date format.
number-of-days: Specify a number to represent the number of days before the current day that you want to use for the search. An example would be 10. If today's date were 3/12/99 (date format is mm/dd/yy), the From date for the Job Scheduler history would be 3/2/99.
Element 3: Ending Time
One of the following is used to specify the ending time before which history entries are included. Any history entries made after the specified time and date are not included in the items displayed.
*AVAIL: Any time that is available for the ending date is included.
end-time: Specify the ending time for the specified ending date that indicates which history entries are to be included.
Element 4: Ending Date
One of the following is used to specify the ending date on which or before which the history entries must have been made. Any history entries created after the specified date are not included in the display.
*END: The history entries to the end of the history information are included.
*CURRENT: History entries whose date is on or before the current date are included in the display.
end-date: Specify the ending date. The date must be specified in the job date format.
number-of-days: Specify a number to represent the number of days before the current day that you want to use for the search. An example would be 10. If today's date were 3/22/99 (date format is mm/dd/yy), the To date for the Job Scheduler history would be 3/12/99.
- RMTLOCNAME
- Specifies the location and network identification of the remote location name that created the job history that you want to work with.
*ALL: Selects all job history for all systems in the network.
*LCL: Selects all job history for the local system.
*JOBCTL: Selects all job history for the default system.
remote-location-name: Specify the name of the location associated with the system whose job history 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.
- SEQOPT
- The Work with History display can be sequenced several ways.
*DATE: Sequences the Work with History display by date.
*JOB: Sequences the Work with History display by job.
*GROUP: Sequences the Work with History display by group.
- START
- Specifies whether the newest job history entries or the oldest job history entries are shown first. The display station user can roll the display up or down to see other job history entries if the job history entry is on another display screen.
*LAST: The last (newest) job history is shown on the bottom line of the display.
*FIRST: The first (oldest) job history is shown on the top line of the display.
Example for WRKHSTJS
Example 1: Working with Job Scheduler History
WRKHSTJS SEQOPT(*JOB)In this example the Work with History display is displayed for all jobs and all groups. The display is sequenced by job.
Error messages for WRKHSTJS