Using Operating System Scheduling on z/OS Systems

Limitations of z/OS Operating System Scheduling Servers

On z/OS operating system scheduling servers, SAS 9.2 supports the scheduling of flows that have a single time event as a trigger. The jobs in a flow are submitted to the Job Entry Subsystem (JES) for execution in an asynchronous manner.

How Operating System Scheduling Works on z/OS Systems

When you schedule a flow, Schedule Manager creates the following files:
  • a REXX program called RunFlow_yyymmddhhmmsssss.rex, which submits each batch job to run on the requested schedule.
  • a file called jobname.status, which contains information about the status of the job.
  • the following files, each of which invokes the REXX program to log the job status:
    • logstart_jobname, which is executed as the first step of each job
    • logend_jobname, which is executed as the last step of the job if all previous steps have a return code of 0
    • logfail_jobname, which is executed as the last step of the job if any of the previous steps has a return code other than 0
  • flowname.cmd, which contains the statements that execute the program for the flow. This file is passed to the at command to be executed when the time event trigger occurs.
  • flowname.log, which contains the log information for the flow.
  • flowname.status, which contains the current status of the flow.
The files are written to a subdirectory called username/flowdefname in the Control Directory that was specified in the operating system scheduling server definition, where username is the identity that scheduled the flow.

Manually Submitting a Flow for Execution on a z/OS Operating System Scheduling Server

Note: On z/OS, unexpected results can occur if you manually submit a flow without having selected Manually Schedule when you scheduled the flow.
If you need to manually submit a flow that has been scheduled on a z/OS operating system scheduling server, follow these steps:
  1. Change to the directory where the flow's files are located (/outdir/username/flowdefname), where outdir is the value of the Control Directory attribute in the operating system scheduling server definition.
  2. At the USS prompt, type a command with the following syntax:
    RunFlow_yyymmddhhmmsssss.rex <runonce|start>
    Specify runonce if you want to run the flow just once, or specify start if you want to resume a recurrence that was specified for the flow.

Canceling a Scheduled Flow on a z/OS Operating System Scheduling Server

If you need to cancel a flow that has been scheduled on a z/OS operating system scheduling server, follow these steps:
  1. At the USS prompt, type at -l.
    Note: Type a lowercase L, not the numeral 1.
    A list of jobs appears, as in the following example:
    1116622800.a   Fri May 20 17:00:00 2005
    1116734400.a   Sun May 22 00:00:00 2005
    1116820800.a   Mon May 23 00:00:00 2005
    1116620801.a   Mon May 23 00:00:00 2005
    1117029000.a   Wed May 25 09:50:00 2005
  2. For each job that you want to cancel, type the following command at the USS prompt: at -r at-jobid, where jobid is the first part of each line of the list of jobs (for example, at -r 1116622800.a).