This documentation describes the procedures involved in submitting batch jobs from VM/CMS. Batch jobs consist of Job Control Language (JCL), which directs the use of computer resources, a program (software instructions written in SPSS, SAS, or SCRIPT, for example) for performing the task at hand, and data on which to work. This set of instructions (the JCL, program, and data) is directed to the computer for processing from CMS using the command 'SUBMIT'.
This documentation was produced by Academic Research and Data Center of USC. Questions about its content should be directed to a consultant at 777-6865.
If your CMS userid was defined prior to mid-October, 2001, and you have never
submitted a batch job, you may require assistance from Computer Services
in order to run batch jobs that attempt to catalog data sets on the MVS file system.
When you first submit a job you will see the following message on the screen
in CMS:
Your CMS userid indicates that you do not have the ability to
catalog data sets on the mainframe. If the job you have just
submitted writes datasets to tape or disk, you will need to
examine the output carefully to look for:
NOT CATALOGED 2
in the dataset name and volume location information in the
execution messages in your JCL output (if you check the output
from your RDRLIST, you can search with the command
/NOT CATALOGED 2). If you see this message, or have questions
about these instructions, please contact Academic Services at
7-6015 or email acadhelp@vm.sc.edu.
Press the 'ENTER' key when ready to exit this screen.
The following lines make up an example batch job with a simple SAS program. Please note that on CMS each of the following lines would be entered beginning in column one.
//MYJOB JOB (N1234567),MYNAME,MSGLEVEL=(1,1),
// PASSWORD=????????,USER=N123456
/*ROUTE PRINT MVS.LOCAL
// EXEC SAS
//SYSIN DD *
DATA ONE;
INPUT LNAME $ 1-10 FNAME $ 11-20 ID $ 21-23
VAR1 25-26 VAR2 27-28 VAR3 29-30 VAR4 31-32 VAR5 33-34 VAR6 35-36;
CARDS;
SMITH WILLIAM 002 748938475849
JONES ANNE 009 389478927829
DOE MARY 004 319902261232
SMITH ANN 007 312104242232
BROWN CATHERINE 008 412507282323
JONES FRANK 010 111705203221
APPLEBY CAROL 001 111801324323
JOHNSON TOM 003 322399182322
SMITH CHARLES 006 382908398272
HARRIS MICHAEL 005 323503353443
;
PROC SORT; BY ID;
PROC PRINT; VAR LNAME FNAME ID;
/*
//
The purpose in presenting this job is to provide those readers with very little experience
with an example to keep in mind as they go through this documentation. Jobs that you
submit will probably be structured differently.
To submit a job for batch processing from CMS and retrieve the output, take the following steps:
1. Create a batch job using XEDIT.
Use the editor (XEDIT) to create a file, such as the SAS example above, containing the JCL and program statements for the job you want to submit for processing. Consult the XEDIT documentation for instructions on how to use XEDIT, and the JCL documentation for information concerning JCL.
2. Include a ROUTE statement in the JCL to indicate where output from the job is to be sent.
To send output from the job to a printer, code the ROUTE statement for the job as follows:
/*ROUTE PRINT dest
dest - replace with the code for the remote site where the output
is to print. The format of "dest" to send output to a printer is:
MVS.Rn
n is the remote site number. Code "LOCAL" instead of "Rn"
if output is to print at Computer Services. Following are examples
of "dest" to route output to a remote printer:
MVS.R8 MVS.R43 MVS.LOCAL
To send output from a job to the reader list of a CMS account in order to examine
the output on your screen, code "dest" in the ROUTE statement as follows:
VM.userid
userid is the CMS userid of the virtual reader to which
output is to be sent. For example:
/*ROUTE PRINT VM.N123456
will send output from a batch job to the virtual reader of the CMS
user with the userid, N123456.
Computer Services recommends coding the PASSWORD parameter in the JOB statement of the JCL for a batch job as: "PASSWORD=????????" (eight question marks). When the batch job is submitted from CMS, the user's current password automatically replaces the question marks. Using this coding prevents unauthorized use of your CMS account. For more information about coding the PASSWORD parameter refer to PASSWORD and JCL .
3. Submit the job for batch processing.
Enter the SUBMIT command to send the job to the computer for processing. There are two ways to use the SUBMIT command:
A. If you are currently editing the file you want to submit ("XEDIT" is displayed in the lower right corner of the display terminal screen, or "XEDIT" appears on the screen when you press the ENTER key of a line-oriented dial-up terminal), enter the following command:
SUBMIT
Using this form of the SUBMIT command enables you to make
changes to a file and submit a job without saving those changes.
B. If you are not in the XEDIT environment ("RUNNING" or "VM READ" is displayed in the lower right corner of the display terminal screen or "CMS" appears on the screen when you press the ENTER key of a line-oriented dial-up terminal), enter:
SUBMIT fileid
fileid is the filename, filetype, and filemode of the
file you want to submit. For example:
SUBMIT FIRST JOB A
It is possible to submit several files as a single job by
specifying multiple fileids in the order in which they are to be
submitted. For example:
SUBMIT FIRST JCL A FILE1 DATA A FILE2 DATA A
In this example, file FIRST JCL A contains the job JCL and is
read as the first part of the job, then FILE1 DATA A and
FILE2 DATA A are read as part of the same job.
You might use this form if the job you want to submit is too large to edit. If so, separate the file into multiple files, edit them as needed, and use this form of the SUBMIT command to submit the job for processing.
Multiple batch jobs may be submitted all at once using one SUBMIT command. The jobs may be in one file or several files. Each job must have a valid JOB statement. The first statement in the first file must be a valid JOB statement in order for any subsequent jobs in the file (or files) to be processed. NOTE: missing or invalid JOB statements in subsequent jobs in the file (or files) can cause the previous job to abend due to misinterpreted JCL.
The following messages are displayed in response to the SUBMIT command (if there are no errors in the job):
PUN FILE nnnn TO RSCS COPY 001 NOHOLD
FILE nnnn (nnnn) ENQUEUED ON LINK MVS
SENT FILE nnnn (nnnn) ON LINK MVS TO MVS JOB
nnnn is the job number assigned to the job by the system.
FROM MVS: time JOB nnnn $HASP165 name ENDED AT MVS
These messages may be preceded by message identification numbers. If there are
errors in the job, the messages may be displayed in a different format.
If upon submission of your job you receive only the message 'RECORD EXCEEDS ALLOWABLE MAXIMUM' the file (or files) you are submitting have a record length which exceeds 80. Reset the record length to 80 (set lrecl 80) and resubmit the file.
If the output is routed to your virtual reader, the following message is displayed:
FILE (nnnn) SPOOLED TO userid -- ORIG MVS
(userid) date time
No "FILE SPOOLED" messages are displayed for output routed to a remote
printer. You will not receive the response messages if you are not
logged on when the messages are issued.
Depending on the demands being made on the computer by other users, these messages may appear soon after you submit the job or after a long wait.
To determine the status of a job, enter the command
DJOB id
id is the job name from the JOB statement or the four-digit
job number assigned by the system (displayed in the messages received
when the job was submitted). For example:
DJOB 1234
If you want to cancel a job, enter the KILLJOB command.
The command is of the following format:
KILLJOB jobname
or
KILLJOB jobnumber
If the job has executed but is printing or is awaiting printing, you must use the PURGE
option of the command to delete the job (PURGE may be abbreviated as 'P'). Please
note: using the PURGE option to cancel printing of job output can cause you to lose
the record of successful or unsuccessful creation/update action on jobs that write
to permanent data sets.
To use the PURGE option, issue the command in the following format:
KILLJOB jobname PURGE
or
KILLJOB jobnumber PURGE
When the KILLJOB command has been issued, a message will be issued by
the system indicating that the job has been canceled.
Several small remote printers are now controlled by RSCS in the VM system rather than by JES2 in the MVS system. Displaying or purging a job after execution but before or during printing requires some additional arguments when the job has been directed to one of these VM controlled printers:DJOB jobnumber VM -- Displays the status of a job after execution but before or during printing controlled by RSCS in the VM (CMS) system. Display by job name is not supported by RSCS.
KILLJOB jobnumber VM -- Purges a job after execution but before printing controlled by RSCS in the VM (CMS) system.
KILLJOB jobnumber VM ACTIVE -- Purges a job after execution but during printing controlled by RSCS in the VM (CMS) system.
'VM' may be abbreviated 'V'. 'ACTIVE' may be abbreviated 'A'.
If you routed your output to a remote printer, you can pick up the output at the remote specified after allowing time for printing, bursting, and sorting it by bin. If your output was directed to your CMS reader, use the RDRLIST command to display information about files directed to your reader. The command RDRLIST can be abbreviated to RL . It displays reader file names and related information on a screen similar to the FILELIST command for permanently saved CMS files. PF keys and special commands similar to FILELIST commands are used to examine and manipulate reader files from this screen.
Following is a list of some things you can do with files in your reader.
Look at the file (PEEK)
To look at the contents of a file in your virtual reader from the RDRLIST screen, move the cursor to the line containing the name of the file you are interested in and press the PF11 key. An alternative is to move the cursor to the beginning of the line containing the name of the file you are interested in, type the PEEK command (for example, PEEK / (FOR *, and press the ENTER key.
By default, the PEEK command displays 200 lines of the file
you are examining. To display more than 200 lines, use the
"FOR" option. For example, PEEK / (FOR 1000 to examine a
thousand lines or PEEK / (FOR * to examine all lines. Be
careful when PEEKing all lines. Attempting to PEEK a file
too large to fit in the storage allotted to your account may
produce numerous cryptic error messages and cause the terminal to hang up.
To set up your personal PEEK default to be more than 200
lines permanently, enter this command from the 'Ready;' prompt:
DEFAULTS SET PEEK FOR nnnn
nnnn is the number of lines you want for your PEEK
default (5000 is a reasonable). This personal PEEK default
will be stored in a file on your CMS filelist called LASTING
GLOBALV. If you discard the LASTING GLOBALV file, your
PEEK default will revert to 200 lines.
Save the file permanently (RECEIVE)
To save a file from your virtual reader permanently, move the cursor to the line containing the name of the file you are interested in and press the PF9 key. An alternative is to move the cursor to the beginning of the line containing the name of the file you are interested in, type the RECEIVE command (for example, RECEIVE / NEW NAME A), and press the ENTER key. NOTE: One space must precede and follow the slash (/) .
To print the file without saving it (USCROUTE and REPRINT)
Printing a file without saving it requires two steps. First move the cursor to the command line, that is, the line containing the arrow that looks like this: ====>, and type the command
USCROUTE dest
dest is the number of the remote site where the output is to
be printed, and press the ENTER key. For example,
USCROUTE LOCAL
sends output to the Computer Services printer.
When you have indicated the output destination with the USCROUTE command, move the cursor to the beginning of the line containing the cursor to the command line, that is, the line containing the arrow that looks like this: ====>, and type the command
USCROUTE dest
dest" is the number of the remote site where the output is to
be printed, and press the ENTER key. For example,
USCROUTE LOCAL
sends output to the Computer Services printer.
When you have indicated the output destination with the USCROUTE command, move the cursor to the beginning of the line containing the name of the file you want to print, type REPRINT, and press the ENTER key.
This page updated December 4, 2001 by Amy W. Yarbrough,
Academic Research and Data Center.
Copyright © 1999, The Board of Trustees of the University of South Carolina.
URL http://www.sc.edu/ardc/docs/submit.htm