Skip to content

Page 1

ND 10534 JOB EXECUTION CONTROL

INTRODUCTION

JEC (Job Execution Control) is a program which offers control over the execution of a BATCH/MODE job, through the use of a few simple control statements.

JEC allows the user to take various actions depending on the result of an executed program.

JEC allows you to terminate a batch/mode job whenever you want to, or to skip steps in the execution.

Using batch/mode jobs, one batch/mode can start the execution of other batch/mode jobs, and again -- depending upon the result of previous steps.

FEATURES

  • Determines whether a program or a SINTRAN file system command has completed execution without error
  • Tests the COMPLETION CODE from a SINTRAN file system command, a user written program, or other ND software (i.e., Compilers, Sort-merge, Libraries ('Cobol', Fortran, File Handler etc.))
  • Tests the SOFTWARE SYSTEM IDENTIFICATION from a SINTRAN file system command, a user written program, or other ND software
  • Sets the SOFTWARE SYSTEM IDENTIFICATION and the COMPLETION CODE with a user written program
  • Provides the ability to jump to labels defined in the command file (both forwards and backwards)
  • Execution can be terminated at any point
  • Programming of repetitive loops
  • Current machine data can be analyzed and used to decide whether a program should be started or not
  • Communication enabled from the terminal with a program executing in a MODE job

PRODUCT DESCRIPTION

JEC contains a re-entrant subsystem which is to be started as soon as a SINTRAN command is to execute within a BATCH/MODE file.

Together with the re-entrant subsystem is a JEC library. This library contains two routines which make it possible for a user-written program to read/write the information on the system segment (COMPLETION-CODE and SSI-CODE). This then makes it possible to control the execution of a batch/mode job from an application program.

EXAMPLE

@ENTER RT...50
@JEC BEGIN            :: Reset
                       Jec information
@JEC ON-ERROR TERMINATE
@JEC PRINT-DATE
@COBOL
COMPILE PROG-NAME...PROG-NAME
EXIT
@JEC PRINT-COMPLETION-CODE
@NRL                  :: ANY ERROR?
'PROG-FILE PROG-NAME'
'LOAD PROG-NAME'
'LOAD xx'
'LOAD yy'
:
EXIT
@JEC PRINT-COMPLETION-CODE  :: ANY ERROR?
@PROG-NAME
@JEC END

SUMMARY OF COMMANDS

Batch and mode commands:

Command Description
@JEC BEGIN Reset JEC information
@JEC TERMINATE Terminate execution
@JEC (numeric label) Label number in the input file. E.g., @JEC 1000
@JEC GO TO (numeric label) Execution will be restarted from this label
@JEC ON-ERROR GO TO (numeric label) Regardless of where in the MODE/BATCH job an error occurs, this GO TO statement will be executed. The ERROR CODE will be written, and the JEC information will be reset.

Page 2

Commands

@JEC ON-ERROR TERMINATE

See ON-ERROR GO TO
JEC information will not be reset.

@JEC IF-evaluation

A simple IF-test may use =, >, <, OR and AND. All of these may be preceded by NOT. More complex expressions are expressed by using the simple expression and logical operators AND, OR. More complex expressions are made possible with the use of nested parentheses. The IF test may also contain a test against the date or day.

@JEC PRINT-DATE

Prints the current date and time

@JEC PRINT-COMPLETION-CODE

Lists the COMPLETION-CODE and SSI-CODE

@JEC CLEAR-COMPLETION-CODE

Clears JEC completion code

@JEC ✂ Comments

Comments may be written behind the ✂ character.

Batch Only Commands:

@JEC TERMINAL-INPUT

Input asked for by user written programs will be entered from the terminal.

@JEC TERMINAL-OUTPUT

Output from user written programs or SINTRAN file system commands will be written to the terminal, as well as on the output file, provided that the output file is different from the terminal.

@JEC MODE-INPUT

Input asked for by user written programs must be entered from the mode file. This is only necessary if TERMINAL-INPUT has been previously used.

@JEC MODE-OUTPUT

Output from user written programs will be written only to the output file. This is only necessary if TERMINAL-OUTPUT has been previously used.

Requirements

SINTRAN III version I or later.
When running –G or earlier versions of SINTRAN III the monitor-call “GMOINF” must be patched in, otherwise the program terminates by the SINTRAN error message «illegal monitor call». The completion code (SEC) will only be saved on the system segment if the I-version (or later) of SINTRAN III is used.

Documentation

SINTRAN III Utilities Manual
ND 60.151