This QUERY co.mand lists the filenames and filetypes of all the jobs
in the batch virtual machine's job queue. You can then reorder them,
using the ORDER command.
Using EXEC Files for Input to the Batch Facility There are a variety of ways that EXEC procedures can help facilitate the
submission of jobs to the CMS batch facility. You can prepare an EXEC file that contains all of the CMS commands you want to execute, and then
pass the name of the EXEC to the batch virtual machine. For example,
consider the files COpy JCL and COPYF EXEC: COpy JCL: /JOB CARBON 999999 EXEC COPYF /* COPYF EXEC: COPYFILE FIRST FILE A SECOND = = COPYFILE THIRD FILE A FOURTH = =
Then, if you enter the commands:
cp spool punch to cmsbatch
punch copy jcl * (noheader
the commands in the EXEC file are executed by the batch virtual machine. You could also use an EXEC to punch
machine. Using the same commands as in
have an EXEC named BATCOPY: CP SPOOL PUNCH TO BATCH3 &PUNCH /JOB CARBON 999999
input to the batch virtual
the example above, you might &PUNCH COPYFILE FIRST PILE A SECOND = = &PUNCH COPYFILE THIRD FILE A FOURTH = = &PUNCH 1* CP CLOSE PUNCH Then, when you enter the EXEC name:
batcopy
the input lines are punched to the batch virtual machine.
The examples above are very simple; you probably would not go to the
trouble of sending such a job to the batch virtual machine for
processing. The examples do, however, illustrate the two basic ways that you can use EXEC procedures with the batch facility:
1. Invoking an EXEC procedure from a batch virtual machine
2. Using an EXEC procedure to create a job stream for the batch
virtual machine
In either case, the EXECs that you use may be very simple or very
complicated. In the first instance, an EXEC might contain many steps,
with control statements to conditionally control execution, errcr
routines, and so on.
In the second instance, you might have an EXEC that is versatile so
that it can be invoked with different arguments so as to satisfy more
than one situation. For example, if you want to create a simple EXEC to
234 IBM VM/370 CMS User's Guide
send jobs to the batch virtual machine to ce assembled, it might
centain: CP SPOOL PUNCH TO BATCH3 CO NT &PUNCH /JOB ARIEL 888888 &PUNCH CP LINK ARIEL 191 391 RR LINKPASS &PUNCH ACCESS 391 B/A &PUNCH ASSEMBLE &1 (PRINT &PUNCH CP SPOOL PUNCH TO ARIEL &PUNCH PUNCH &1 TEXT A (NOHEADER &PUNCH 1* CP SPOOL PUNCH NOCONT CLOSE If this file were named BATCHASM EXEC, then whenever you wanted the catch facility to assemble a source file for you, you would enter:
batchasm filename
and the batch virtual machine weuld assemble the source file, print the
listing, and send you a copy of the resulting TEXT file. SAMPLE SYSTEM PROCEDURES FOR BATCH EXECUTION To extend the above examFle a little further, suppose you wanted to
process source files in languages other than the assembler language. Yeu want, also, fer any user to be able use this EXEC. You might have a
separate EXEC file for each language, and an EXEC to control the
submission of the job. This example shows the controlling EXEC file
EATCH and the ASSEMBLE EXEC. * THIS EXEC SUBKITS ASSEMBLIES/COKPILATIONS TC CMS EATCH
* * - PUNCH BATCH JOB CARD;
* -CALL APPROPRIATE LANGUAGE EXEC (&3) TO PUNCH EXECUTABLE COMMANDS * &CONTROL ERROR &IF &INDEX GT 2 &SKIP 2 &TYPE CORRECT FORM IS: BATCH USERID FNAME FiYPE (LANGUAGE) &EXIT 100 &ERROR &GOTO -ERR1 CP SPOOL D CONT TO BATCHCMS &PUNCH IJOB &1 1111 &2 &PUNCH CP LINK &1 191 291 RR SECRET &PUNCH ACCESS 291 B/A EXEC &3 &2 &1 &PUNCH 1* CP SPOOL D NOCONT CP CLOSE D CP SPOOL DOFF &EXIT -ERR1 &EXrT 100 Section 12. Using the eMS Batch Facility 235
Previous Page Next Page