MCIT Technical Newsletter #2

Job/Step Execution Control

 

      Definitions:  STEP CONTROL - insuring that a job’s steps execute or not
                                   based on any previous step’s condition/abend
                                   codes.

                     JOB CONTROL - insuring that jobs run in the correct sequence
                                   and all predecessors were successful.

                 RESTART CONTROL - insuring that a job that is restartable is
                                   restarted correctly and that a job that is
                                   not restartable can not be restarted easily.

        MVS' step control is not particularly easy to use and restart and job control
     are lacking altogether.  A new and much more user friendly condition code mechanism
     has been implemented with recent releases of MVS.  The IF/THEN/ELSE/ENDIF control
     mechanism very easy to use and has the ability to control blocks of JCL steps
     based on previous step's return codes.

        The best way to insure correct step control is by modeling execution of all
     of the probable codes that will be encountered during day to day production
     processing.  There is a modeling program available to aide in this process. 
     DR0060CPis a simple program that returns the condition code that was
     passed to it as a parameter.  By simply replacing any program in a JCL member
     with DR0060CP and including a numeric parameter, that parameter will be
     returned by the step. Either the IF/THEN/ELSE/ENDIF or COND= can be thoroughly
     tested. DR0060CP can also simulate abend conditions by coding PARM=ABEND.
     A sample condition code modeling job can be found in 'H308.SPF.JCL(CONDCODE)'.

        Job control can be implemented by a CONTROL FILE to pass information
     between jobs.  The simplest form id a file (QSAM or VSAM) in which each job
     writes it own status and any subsequent job can interrogate a predecessor's
     status.  Status passed would include information that the predecessor job has
     not yet started, is currently running, has abended or has successfully
     completed.  Step information could also be stored so that the availability
     of resources can be determined at a step end to trigger successor jobs.  A set of
     programs has been developed to implement a rudimentary job control system.
     There are three programs, CTRLSET, CTRLINQ and CTRLINIT to perform
     the aforementioned control processing.  The COBOL source code for these programs
     can be found in 'H308.SPF.SOURCE'.  These sample programs are a model for
     a QSAM based control system.  This type of control system should be used in 
     conjunction with any production scheduling system to provide a fail safe data
     processing environment.

        Restart control can be accomplished by expanding the job control system to 
     operate at the step level.  The job/step status would then communicate go or no-go 
     to subsequent job steps, which could prevent starting non-restartable jobs.
     Production control's scheduling system has the capability of marking a job non-
     restartable, but this restart control mechanisn will provide additional protection
     against improper restarting.