* CORRECT FORM IS: ASSEMBLE FNAKE USERID *
* PUNCH COMMANDS TO: * - INVOKE CMS ASSEKBLER * - RETURN TEXT DECK TO CALLER
* &CONTROL ERROR SERROR SGOTO -ERR2 SPUNCH GLOBAL MACLIB UPLIB CKSLIB OS MACRO SPUNCH CP KSG S2 ASKBLING ' Sl ' SPUBCH ASSEMBLE Sl (PRINT NOTERM) SPUNCH CP MSG S2 ASSEKBLY DONE SPUNCH CP SPOOL D TO &2 BOCONT SPUNCH PUNCH Sl TEXT A1 (NOHEADER) &BEGPUNCH CP CLOSE D CP SPOOL DOFF RELEASE 291 CP DETACH 291 SEND SEXIT -ERR2 SEXIT 102 If the above EXEC procedure is invoked with the line:
batch fay payroll assemble
the BATCHCMS virtual machine's card 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/B GLOBAL MACLIB UPLIB CMSLIB 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 (NOREADER) CP CLOSE D CP SPOOL DOFF 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
normal messages that the batch facility issues, those messages that are
included in the EXEC. A BATCH EXEC FOR A NON-CMS USER Many installations run the CMS batch facility for non-CMS users to
submit particular types of jobs. Usually, a series of EXEC files are
stored on the system disk so that each user only needs include a card to
236 IBK VM/370 CMS User's Guide
Paqe of GC20-1819-2 As Updated April 1, 1981 by TNL GN25-0826
invoke the EXEC, which executes the correct commands to process data included with the job stream. example, if a non-CMS user wanted to
files, the followinq BATFORT EXEC file could
disk: &CON'TROL OFF compile FORTRAN source
be stored on the system
FILEDEF INMOVE TERM (RECFM F BLOCK 80 LRECL 80 FILEDEF OUTMOVE DISK &1 FOPTRAN A1 F LRECL 80 BLO:K 80 MOVEFIIE TXTLIB FORTRAN FORTGI &1 (PRINT)
&FJRTRET = &RETCODE &IF &RETCODE NE 0 &GOTO -EXIT PUNCH &1 A1 (NOHEADER) -EXIT &EXIT &FORTRET
To use this a non-CMS user might place the following real card
deck in the system card reader:
ID Cr-!SBATCH IJJB JOEUSER 1234 JOB10 BATFORT JOEFORT sOllrce file 1* (end-of-file indicator) 1* (end-of-job indicatorj When the batch virtual machine executes. this job, it begins reading
the EXEC procedure from disk, and executes one line at a time. When it
encounters the MOVEFILE command, it begins reading rhe source file from
its cari reader (the batch facility interprets a terminal read as a
request to read from the card reader). It continues readinq until it
reaches the end-of-file indicator (the 1* card), and then resumes
processing the EXEC on the next line following the MJVEFILE command
line.
Additional functions may be added to this EXEC procedure, or others
may be written and stored on the system disk to provide, for example, a
compile, load, and execute facility. These EXEC procedures would allow
an installation to accommodate the non-CMS users and maintain common
user procedures.
Section 12. Using the CMS Batch Facility 237
Previous Page Next Page