Skipping Robot/SCHEDULE Runs on AS/400-Class Machines
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
|