fhg
Volume 11, Number 30 -- October 12, 2011

Skipping Robot/SCHEDULE Runs on AS/400-Class Machines

Published: October 12, 2011

Hey, Joe:

On our System i 550, we use Robot/SCHEDULE for batch processing. Every so often, we have a programming issue where we have to skip running a job in the middle of a long job stream. The skipped job sometimes has reactive jobs hanging off it. We still want to run the reactive jobs, even when we don't run their prerequisite job. Got any ideas?

--Keith


Like many other shops, we also use Robot/SCHEDULE for running batch job streams on our System i and Power i machines. Like you, we’ve encountered the same issue where we want to skip running one job in a long job stream, while keeping the job stream intact. Here's how we usually handle the situation.

The Problem

Because of a data or program problem, we can't run one job in our nightly end of day job stream. End of day runs a long string of Robot jobs in sequence and many of these jobs are reactive. The reactive jobs run only if their prerequisite jobs completes successfully.

When a programming error occurs, we may need to temporarily stop running one prerequisite job until a program is fixed. But until we fix the problem, we still want to run all the other jobs that are dependent on running the skipped prerequisite job. We can usually do this by using Robot's OMIT run feature.

Here's an example of how we do this. Maybe this can work for your shop.

Look at the following two Robot jobs in my Robot Job Schedule List. JOETEST1 runs at 01:00 each morning and JOETEST2 will only run if JOETEST1 completes successfully (it reacts to JOETEST1's completion).



In turn, there may be several other SCHEDULE jobs that are dependent on JOETEST2 completing correctly.

The Imperfect Solutions

The dilemma comes in when there's a problem with JOETEST1 and we don't want to run it the next night. However, JOETEST2 still works correctly so we want to run that job. To do this, we used to put JOETEST1 into a HOLD status (H) like this.



This will stop JOETEST1 from running until the program is fixed. But since JOETEST2 is dependent on JOETEST1, JOETEST2 won't run when we want it to. There may also be other reactive jobs that are dependent on JOETEST 2 completing. These jobs wouldn't run in a hold scenario.

Alternatively, we could still hold JOETEST1 and reconfigure the JOETEST2 job so that it now runs even if JOETEST1 doesn't run. But since we only need to hold JOETEST1 for one night, we'd rather not mess with our Robot/SCHEDULE schedule too much. A third solution is to hold JOETEST1, monitor the job stream, and manually kick off JOETEST2 at the proper time. None of these alternatives satisfactorily reach my real goal: which is to temporarily hold JOETEST1 for one run only while still automatically completing the job stream.

The Preferred Solution: SCHEDULE's OMIT Feature

When this happens, my preferred solution is to change the Robot/SCHEDULE code of my prerequisite job to 'O' (OMIT). This can easily be done by placing an 'O' in front of the SCHEDULE job entry and pressing ENTER. This will make my JOETEST1 job schedule entry now look like this on Robot's Job Schedule List.



OMIT is a very useful Robot job scheduler feature that does the following things.

1. It omits only the next scheduled job run of JOETEST1. In this case, the JOETEST1 job will not run at 01:00 for just this one run. After the scheduled run time comes, the OMIT schedule code will be removed and the JOETEST1 job schedule entry will revert back to the schedule code it had before I changed its status to OMIT.

2. Because its status was OMIT at its scheduled run time, any job that is dependent on JOETEST1 finishing will still run, even though JOETEST1 did not run. Robot/SCHEDULE will log a job completion status of 'O' (Omit) for JOETEST1, and all dependent jobs (including JOETEST2) will still react off that status and execute.

By setting its job schedule code to OMIT rather than HOLD, I can bypass my problem job without disrupting my end of day job schedule. And when this one-time bypass is finished, the job schedule entry resets itself back to normal. So I don't have to do anything more than set the job scheduler entry to OMIT and Robot/SCHEDULE will do the rest to solve my problem.

So that's how we handle keeping a job stream intact when we have to temporarily stop one of its jobs from running.

Hope this helps.

Note: This solution was tested on runs on Help/Systems Robot/SCHEDULE 10.

--Joe




                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
THE 400 SCHOOL - INSTRUCTOR DAN RIEHL

Live Training Workshops for the IBM i

RPG, COBOL, Control Language,
Operations, System Administration,
Security Management, Query and SQL
Live RPG IV and COBOL Boot Camps

Attend Live classes Online in our "Virtual Classroom for the IBM i"
or we can present these same classes on-site at your offices worldwide.

                         A Few of the many Benefits:
                          The 400 School, providing training for over 25 years
                          Industry expert Dan Riehl is the Live Instructor
                          Full Length 3, 4 and 5-Day Classes
                          Live Video and Audio – Always see and hear the Instructor, and other students
                          Avoid the heavy cost of Travel for our Online Workshops
                          Log on to our IBM System i for class and for Supervised Hands-On Labs
                          Special discounts for multiple students - up to 50%

Check out the Schedule for Online Classes


Senior Technical Editor: Ted Holt
Technical Editor: Joe Hertvik
Contributing Technical Editors: Edwin Earley, Brian Kelly, Michael Sansoterra
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

System i Developer:  Join the Gurus at the RPG & DB2 Summit in St. Louis, October 17-19
The 400 School:  LIVE Online Training RPG IV & COBOL Boot Camps
inFORM Decisions:  Paperless saves $$$. Watch our iScan VIDEO DEMO and get FREE white papers.


 

IT Jungle Store Top Book Picks

BACK IN STOCK: Easy Steps to Internet Programming for System i: List Price, $49.95

The iSeries Express Web Implementer's Guide: List Price, $49.95
The iSeries Pocket Database Guide: List Price, $59
The iSeries Pocket SQL Guide: List Price, $59
The iSeries Pocket WebFacing Primer: List Price, $39
Migrating to WebSphere Express for iSeries: List Price, $49
Getting Started with WebSphere Express for iSeries: List Price, $49
The All-Everything Operating System: List Price, $35
The Best Joomla! Tutorial Ever!: List Price, $19.95


 
The Four Hundred
IBM Readies October Power Systems Announcements

Speaking of IBM i Innovation . . .

Oracle Drives Java Technology Forward at Annual Conference

As I See It: The Other Final Frontier

Oracle Has Built A Modern, Cloudy AS/400

Four Hundred Stuff
GXS Shares Development Plans for IBM i Customers

QlikTech Boosts Collaboration with New BI Release

IBM Updates RDP and RDi for SOA Tooling

Apple iPad Now Runs JDE E1

LANSA Updates Product Data Synchronization Software

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

System i PTF Guide
October 8, 2011: Volume 13, Number 5

October 1, 2011: Volume 13, Number 4

September 23, 2011: Volume 13, Number 3

September 17, 2011: Volume 13, Number 2

September 10, 2011: Volume 13, Number 1

September 25, 2010: Volume 12, Number 39

TPM at The Register
Citrix pushes the pedal on NetScaler appliance metal

Can network architectures break the speed limit?

Job creation better than expected in the US

Oracle settles with Feds over price gouging

Oracle floats Fusion apps, puffs up public cloud

Oracle previews RHEL-ish 2 Linux kernel

Teradata adds hardware compression to data warehouses

HP uncloaks 10GbE top-of-racker, IPv6 guidance

Dell building its own Exadata killer

Oracle previews Solaris 11, due in November

Red Hat snatches storage Gluster file system for $136m

EMC Project Lightning flash cards promised 'this year'

THIS ISSUE SPONSORED BY:

WorksRight Software
ProData Computer Services
The 400 School


Printer Friendly Version


TABLE OF CONTENTS
Adobe Flash Builder for the iSeries Programmer, Part 3

Add Outfile Support to Your Applications

Skipping Robot/SCHEDULE Runs on AS/400-Class Machines

Four Hundred Guru

BACK ISSUES




 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2011 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement