Sample System Procedures for Batch Execution
To extend the previous example a little further, suppose you wanted
to process source files in languages other than the assembler language.
You want, also, for any user to be able to use this exec. You might
have a separate exec file for each language and an exec to control
the submission of the job. Figure 1 shows
the controlling file and BATCH EXEC, and Figure 2 shows
the language file and ASSEMBLE EXEC.
Suppose FAY (user ID = FAY) invokes the BATCH EXEC by issuing the
following command:
batch 1111 payroll assemble
The
BATCHCMS virtual machine's reader should contain the following statements
(in the same general form as a FIFO console stack): /JOB FAY 1111 PAYROLL
CP LINK FAY 191 291 RR SECRET
ACCESS 291 B/A
GLOBAL MACLIB UPLIB DMSGPI OSMACRO
CP MSG FAY Asmbling PAYROLL
ASSEMBLE PAYROLL (PRINT NOTERM)
CP MSG FAY Assembly done
CP SPOOL D TO FAY NOCONT
PUNCH PAYROLL TEXT A1
CP CLOSE D
CP SPOOL D OFF
RELEASE 291
CP DETACH 291
/*
When the batch facility executes this job, the commands
are executed as you see them: if you are logged on, you receive, in
addition to the usual messages that the batch facility issues, those
messages that are included in the exec.