04 - System Administration (EN)04g - System Admin miscellanea

WRKJOBJS (IBM Advanced Job Scheduler for I)

Note: You must have license 5722-JS1 (Job Scheduler for iSeries) to use this command.

The Work with Jobs using Job Scheduler (WRKJOBJS) command allows you to work with a single job, groups of jobs or all jobs set up within the advanced Job Scheduler. Unlike the classic WRKJOBSCDE, it is possible to sort the display by job, date or group.

Job groups are jobs that are grouped to be executed consecutively in the specified order. Normal completion is required for each job in the group before the next job in the group is submitted for processing. If a job in the group does not complete normally, processing stops for that group.

Case study:

The choice to deepen the use of the Job Scheduler Advanced for I derives from the need to run a series of programs at set times.

In the absence of this more flexible and dynamic scheduler, most system administrators resort to alternative solutions with the SLEEP or DLYJOB function within an RPG or CL program where with a cycle they process the call to their programs every tot. minutes, but I would say, alas the benefits are not the same.

Trivially, in fact, with this product, you also have the option of carrying out the planning within a fiscal calendar or even just on holidays, or perhaps by specifying a predetermined start and closing date and time.

Syntax:

In order to use the scheduler, you must first start the IBM Advanced Job Scheduler for I job monitor:

  • STRJS DTALIB (* PROMPT)
  • Option 1 – Start the job monitor and verify that its status is set to ACTIVE
  • Finally run the WRKJOBJS command

The jobs of the Job Scheduler WRKJOBSCDE are distinct from those present under WRKJOBJS and can even be recalled with the same name. When a job is referenced in this command, it refers to an entry in the Job Scheduler.A Job Scheduler entry is a user-defined name for commands or schedules that you want to process at scheduled times and dates.Job Scheduler jobs (entries) are not IBM I system objects.

Configuration can also be done from the Navigator For I.

Examples:

We create a new job that must perform the forwarding of two programs at 30-minute hourly intervals that process the Transfer Orders of different suppliers in sequence. Yes, with this scheduler, it is possible to set up and schedule a series of jobs that are executed consecutively in a specified order without necessarily having to resort to the creation of an additional CL.

The Execute Remote Command (RUNRMTCMD) checkbox is used to execute commands on non-IBM I systems. (Currently I haven’t had the need to use it, but it’s a pretty intriguing possibility).

Furthermore, if the job is not completed regularly, there is the possibility to specify as an optional parameter an alternative job to be performed, in addition to sending an email notification for each completed job anomaly.

Alternate jobs are performed only when a regular job is terminated abnormally. Jobs do not need to have alternative jobs. Among the various parameters, we can also specify the name of the group to be associated with the alternative job.

You can use Advanced Job Scheduler to view the history or status of a job or group of jobs. You can also set the activity history, which is how long you want to keep activity records for a job.

References:

For more information, the official IBM documentation is available at the following link with all the parameters: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/cl/wrkjobjs.htm

About author

IT Specialist, IBM i passionate

Leave a Reply

%d bloggers like this: