z/OS JES2 Initialization and Tuning Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Writing a day's work scheduler

z/OS JES2 Initialization and Tuning Guide
SA32-0991-00

Establish the use of automatic command processing with the AUTOCMD parameter on the CONDEF statement at initialization. You can enter the commands with the JES2 $T command or write a program to put command statements through an internal reader.

Use the T= keyword on the $T A command to specify the time of day JES2 will issue automatic command(s). T= specifies a time in hours (hh) and minutes (mm) from the previous midnight. Therefore, if the specified time is earlier than the current time, the command is executed immediately. If the time is greater than the current time, the command will be executed hh hours and mm minutes after the last midnight. If the specified time is greater than 24 hours, (note the maximum value for T= is 99.59) a command can be executed up to as many as 3 days, 3 hours, and 59 minutes after the previous midnight. (The time is reset by JES2 each day (at midnight) by decreasing the value by 24 hours.) The following example shows these three situations.

If the current time is 14:00 on Tuesday, then:

    $TA,T=11.30,'$S LINE(1)'     /*LINE1 started immediately    */
    $TA,T=15.00,'$S LINE(2)'     /*LINE2 started in one hour    */
    $TA,T=27.00,'$S LINE(3)'     /*LINE3 started at 03:00 Wed   */
    $TA,T=51.00,'$S LINE(4)'     /*LINE4 started at 03:00 Thurs */
    $SA,ALL

Be aware that if these automatic commands are not added to your initialization data set, and JES2 experiences a failure, the commands are lost. You can prevent such situations by adding the commands to your initialization data set or by submitting a $TA,T=24.01,'$VS,'S D,JOB=jobname'' (where D is a reader procedure and jobname defines a job that contains the series of automatic commands your installation wants to execute daily) command to automatically recall the job each day. Note that the following example procedure provides a set of automatic commands that are continually refreshed daily.

$TA001,T=00.01,'$TRDI,A=0'                /*SET INTERNAL READERS' AUTH*/
$TA004,T=00.03,'$VS,'V 02C-02F,ONLINE''    /*VARY PRINTERS ONLINE   */
$TA115,T=00.05,'$OJOBQ,Q=B,CANCEL'        /*CANCEL CLASS B HELD OUTPUT*/
$TA116,T=07.58,'$VS,'S MANAGMT,JOB=BKUPCTLG''    /*  SUBMIT JOB THRU*/
$TA300,T=15.58,'$VS,'S MANAGMT,JOB=BKUPCTLG''    /*  MANAGMT PROC   */
$TA400,T=23.58,'$VS,'S MANAGMT,JOB=BKUPCTLG''    /*  EVERY 8 HRS    */
$TA995,T=24.01,'$VS,'S D,JOB=AUTOCMD1''    /*SUBMIT MEMBER TO INTRDR*/

The following statements represent sample command statements placed in the initialization data set:

    $TA,T=10.30,'$SLINE(1-3)'
    $TA,T=12.30,'$TI1,C=ABC;TINIT2,C=XBC',L=A
    $TA,T=16.15,'$PLINE(1),LINE(3);DMR1-9,'PLEASE SIGN OFF ASAP'
    $TA,I=90,'$DPRT2,L=CN3D8-A'
These four statements mean the following (and include times of the day set aside for the processing):
  1. Start the three remote job entry lines defined.
  2. Modify these initiators.
  3. Prepare to stop the remote job entry lines and give a warning to users who are currently using the system.
  4. Display the attributes of printer 2 every 90 minutes (through the Interval parameter) to out-of-line area A at console CN3D8.
These commands may be set up by a user-written program for scheduling the day's work. This program can use the internal reader to enter the commands in the subsystem. When writing such a program, consider the following:
  • When more than one command is to execute at approximately the same time, you should combine them into one command text entry.
  • The responses to the command within the text are normally directed to the in-line messages area and to any consoles receiving MCS route code 1, unless you use the L= operand as described in z/OS JES2 Commands.
  • Multiple commands with responses to the out-of-line area on graphic consoles normally are automatically overlaid so rapidly that the operator cannot view them. Avoid this kind of command sequencing.
  • The authority of the internal reader determines which of the commands entered through it will be valid. See z/OS JES2 Commands for a discussion of command authority relative to automatic command processing.
  • The day's work scheduler program should limit the number of automatic command entries to a value that does not overload the system consoles or leave the operators insufficient resources for their interval status displays.
  • An entire automatic command processing entry must fit on an 80-column statement image.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014