HISTORICAL MANUALS

 
                                           UNIVERSITY OF KENTUCKY
                                           COMPUTING CENTER
 
                                           CMS Batch User's Guide
         Software Documentation
                                           Release 2
 
 
 
 
 
 
 
 
 
 
                                           UU  U KK  K   CCCC  CCCC
                                           UU  U KK K   CC    CC
                                           UU  U KKK    CC    CC
                                           UU  U KK  K  CC    CC
                                            UUU  KK   K  CCCC  CCCC
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         First Edition, Revision 0 (October 1983)
 
         Users of this manual are encouraged to report
         any errors or ambiguities, and to make
         suggestions for improvements.  The author can
         be contacted at the address below.
 
         Technical changes made to the contents of this
         manual are indicated by a vertical bar to the
         left of the change.
 
         University of Kentucky
         Computing Center
         72 McVey Hall
         Lexington, KY  40506-0045
         Phone: 606/257-2900
 
         Processed October 17, 1983-Waterloo SCRIPT - Version 82.1 (04/20/83)
 
         Prepared by Dave Elbon
 
 
 
                                                                        PREFACE
 
         The  CMS  Batch  system  was  developed  at  the  Laboratory  for  the
         Application of  Remote Sensing  (LARS)  at  Purdue University  between
         April 1980 and July 1981.  Design and development work was done by Tom
         Wilson and Pete Jobusch,  now employed at SAS Institute,  and by Louis
         Lang  of LARS.    The  system  has been  made  available  to other  VM
         installations  and  distributed  without  charge  by  the  developers.
         Modifications for use at the University  of Kentucky were made by Dave
         Elbon of the UKCC Systems Group.
 
         Portions of  this manual were adapted  from the LARS CMS  Batch System
         User's Guide.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                                                 Preface     iv
 
         CMS Batch User's Guide
 
 
 
                                                                       CONTENTS
 
 
         Section 1.  Introduction  . . . . . . . . . . . . . . . . . . . . .  1
 
         Section 2.  The Batch Environment . . . . . . . . . . . . . . . . .  2
 
         Section 3.  The BATCH Command . . . . . . . . . . . . . . . . . . .  4
 
         Section 4.  Job Control Statements  . . . . . . . . . . . . . . . . 11
 
         Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                                                Contents     ii
 
         CMS Batch User's Guide
 
 
 
         Section 1:  Introduction
 
 
         The CMS Batch system allows you  to perform time-consuming tasks under
         CMS without tying up your terminal for extended periods.  Using SCRIPT
         to process a large  document or group of documents is  a good example.
         While the CMS Batch system is processing your documents,  you and your
         terminal are free to perform other tasks.  Each CMS Batch job consists
         of a few job control statements (usually only two)  and the CMS and CP
         commands required to perform the desired functions.
 
         Your interface with the CMS Batch system is the BATCH command.   It is
         used to submit and control your CMS  batch jobs.   It can also be used
         to  interactively  construct  the  job  control  statements  you  will
         require.   Once submitted,  your jobs are  queued for execution by CMS
         Batch and you will receive messages when execution begins and ends.
 
         Your CMS  Batch jobs will  be executed  by special batch  servers with
         read-only access to the files on your A-disk (191).   Read-only access
         is also provided to your D-disk (192),  if you have one.   A temporary
         disk with  a capacity  of about 500  kilobytes is  provided as  a work
         area.   The  batch servers have  1 or  2 megabytes of  storage.   This
         relatively  large  size  is required  for  some  programming  language
         compilers.
 
         Virtually anything that you can do at a terminal under CMS can be done
         in a CMS Batch job.
 
         Output  is returned  from  your CMS  Batch job  in  spool files.    By
         default, all printed and punched output is routed to your userid.  You
         will also  receive a console  log from the  batch server to  provide a
         record  of your  job.   An  optional  diagnostic listing  of your  job
         control statements is available.   You may use the SETPRT, SETPUN, and
         SETCON commands to route your output to other destinations.
 
         The CMS Batch system maintains records of each job it receives and the
         BATCH QUERY  function can be used  to examine this  information.   The
         BATCH command also has HOLD,  RELEASE,   and CANCEL functions that you
         can use to control your job's execution.   CMS Batch also supports job
         chaining.  This allows you to specify up to eight other CMS Batch jobs
         that must complete  successfully before a given job  will be executed.
         The BATCH CHANGE  function allows you to alter some  of the parameters
         of a job that has been submitted but has not begun to execute.
 
         The cost  of running  each CMS  Batch job  is charged  to the  account
         number of the  userid that submitted the job.   There  is no provision
         for charging to another account.   You  may specify the rate period in
         which a job should be run (DAY, NIGHT, WEEKEND, or HOLIDAY).
 
 
                                                 Section 1:  Introduction     1
 
         CMS Batch User's Guide
 
 
 
         Section 2:  The Batch Environment
 
 
         As described in the Introduction,  each CMS Batch job is executed by a
         batch server.   A batch server is a  special CMS userid that is logged
         on to execute your  job and logs off when the  job is completed.   The
         batch server has read-access to the  files on your A-disk (and D-disk,
         if you have  one)  and write-access to a 500  kilobyte temporary disk.
         One or two megabytes of virtual storage are provided.
 
         Because of limitations in CMS disk  file management,  you should never
         change the files on your disks that are being used by an executing CMS
         Batch job.    (You will receive a  message from the batch  system when
         your job begins  execution.)   Since the  batch server has  only read-
         access to  your files,   there is  no danger  of damage  to the  files
         involved,  but changing a file that is  being used as input by a batch
         job  will almost  certainly  cause  the batch  job  to  fail,  and  is
         guaranteed to  at least  cause incorrect results.    You may  alter or
         erase any of your files that are not in use by a batch job.
 
         A CMS  batch job may  produce both  printed and punched  output files.
         This output  is by default  sent back to  your userid as  reader spool
         files.  If your batch job produces CMS disk files, they may be sent to
         your  userid with  the SENDFILE  command.   The  CMS commands  SETPRT,
         SETPUN,  and  SETCON can  all be used  to control  the routing  of the
         output from  your batch job.   The  console log from the  batch server
         contains a record of  each command executed by your job  and the total
         cost of the job.
 
         A CMS Batch job consists of a few job control statements (only two are
         required) and the CP and CMS commands that you want to execute.  These
         commands are read by the batch server through its reader.   This means
         that your batch job may not use commands like ACCEPT, INPUT,  and DISK
         LOAD, which use the reader.   The commands and data you supply in your
         job will be  treated as if they  were entered at a  terminal.   Output
         that would  normally be displayed at  the terminal is recorded  on the
         console log.   Since no terminal  is actually present,  commands which
         require  the  special  features  of a  particular  terminal  will  not
         function.   For example, the CLEAR command (which clears the screen of
         a display terminal)  will  have no effect if executed in  a batch job.
         XEDIT can be used in a batch job, but will operate in typewriter-mode.
 
         The following  example illustrates how a  typical CMS Batch  job might
         look:
 
              /JOB
              SCRIPT MYFILE ( PRT
              /*
 
 
                                        Section 2:  The Batch Environment     2
 
         CMS Batch User's Guide
 
 
 
         This job would  process "MYFILE SCRIPT" on the  submitting user's disk
         and send the printed  output back to that userid.   The  user may then
         use PEEK,  RBROWSE,  or RXEDIT to  examine the results,  use OUTPUT to
         produce printed output,  or use ACCEPT to read the file to a permanent
         disk.
 
         It is  important to be  aware of the  restrictions imposed by  the CMS
         Batch system.    Some restrictions  are inherent  in the  batch server
         environment.  Other restrictions are required to control the resources
         used by the system and to provide some degree of security.
 
         Restrictions
 
            · CPU time is limited to 10 seconds by default.   You may specify a
              higher or lower limit.
 
            · Spooled  output is  limited to  2,000  lines and  5,000 cards  by
              default.   These limits may also be changed, but output routed to
              the HOT printer in McVey Hall is always limited to 1,600 lines.
 
            · No tapes may be used.
 
            · You should  not modify or  erase any files that  are in use  by a
              batch job.  Doing so will have predictably bad results.
 
            · Commands that use the reader cannot be used in a batch job.  This
              includes ACCEPT, GATHER, PEEK, RECEIVE, RBROWSE, REPRINT, RXEDIT,
              INPUT, READCARD,  DISK LOAD,  FILEDEF using RDR,  SPOOL RDR,  and
              CLOSE RDR.
 
            · CP and CMS commands in your batch job must be in uppercase.
 
            · AUTOLINK cannot be used from a batch job.
 
 
 
 
 
 
 
 
                                        Section 2:  The Batch Environment     3
 
         CMS Batch User's Guide
 
 
 
         Section 3:  The BATCH Command
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                            Section 3:  The BATCH Command     4
 
         CMS Batch User's Guide
 
 
 
                                                                          BATCH
 
         The BATCH command is your interface with the CMS Batch system.  It can
         submit jobs (and assist in  their preparation),  change job parameters
         after submission,  cancel jobs,  hold and release jobs,  and query the
         CMS Batch system for information.  The format of the command is:
 
         +--------------------------------------------------------------------+
         |         |                                                          |
         | BATch   | [function  [( options...  [)]]                           |
         |         |                                                          |
         |         | BATCH Functions:                                         |
         |         |                                                          |
         |         | macroname [parms]                                        |
         |         |                                                          |
         |         |         +                              +                 |
         |         |         |         +         +        ++|                 |
         |         | Submit  |filename |filetype |filemode|||                 |
         |         |         |         |BATCH    |*       |||                 |
         |         |         |         +         +        ++|                 |
         |         |         |                              |                 |
         |         |         |fileid1 [fileid2...]          |                 |
         |         |         +                              +                 |
         |         |                                                          |
         |         |         +      +                                         |
         |         |         |jobid |                                         |
         |         | CAncel  |ACTIVE|                                         |
         |         |         |ALL   |                                         |
         |         |         |QUEUE |                                         |
         |         |         +      +                                         |
         |         |                                                          |
         |         |         +               +                                |
         |         |         |All            |                                |
         |         |         |Current        |                                |
         |         |         |Job jobid      |                                |
         |         | Query   |User userid | *|                                |
         |         |         |System         |                                |
         |         |         +               +                                |
         |         |                                                          |
         |         | CHange  [jobid]                                          |
         |         |                                                          |
         |         |         +     +                                          |
         |         | Hold    |jobid|                                          |
         |         | Release |ALL  |                                          |
         |         |         +     +                                          |
         |         |                                                          |
         |--------------------------------------------------------------------|
         |           (Continued on next page...)                              |
         +--------------------------------------------------------------------+
 
 
 
                                            Section 3:  The BATCH Command     5
 
         CMS Batch User's Guide
 
 
 
                                                                          BATCH
 
         +--------------------------------------------------------------------+
         |           (Continued from previous page)                           |
         |--------------------------------------------------------------------|
         |         |                                                          |
         |         | Options:                                                 |
         |         |                                                          |
         |         | +       +  +     +  +            +                       |
         |         | |Clear  |  |Long |  |Msgcount n  |                       |
         |         | |NOClear|  |Short|  |         100|                       |
         |         | +       +  +     +  +            +                       |
         |         |                                                          |
         +--------------------------------------------------------------------+
 
         BATCH Functions
 
         CAncel    cancels the specified jobs, before or during execution.
 
         CHange    permits you to change the parameters (/SET, etc.)   of a job
                   which  has already  been  submitted but  has  not yet  begun
                   execution.    Changes  are made  interactively;   the  BATCH
                   command will prompt you for required information.
 
         Hold      places the  specified jobs on  hold.   The CMS  Batch system
                   will not schedule held jobs for execution until released.
 
         macroname specifies the filename of a  CMS Batch macro.   The filetype
                   must  be  "BATCH."  CMS  Batch  macros  may contain  EXEC  2
                   statements,  BATCH command functions,   batch jobs,  and CMS
                   commands.   Each  line in the file  is treated as  a command
                   until  a  line  containing  "/JOB"  is  encountered.    This
                   indicates the start of a batch job.  Additional commands may
                   follow the /* at the end of the job.
 
         Query     displays information about your jobs  already in the system.
                   QUERY CURRENT,  the default,  will  display all of your jobs
                   that are in the batch system.
 
         Release   releases the  specified jobs  so they  can be  scheduled for
                   execution.    This  will  not  release a  job  held  by  the
                   operator.
 
         Submit    initiates job preparation and submission.    If no fileid is
                   included, BATCH assumes that you want assistance preparing a
                   job;  otherwise,  the  files specified are submitted  as one
                   batch job.  If one or more fileids are specified, BATCH will
                   not prompt  for additional information  at any stage  of its
                   operation.
 
                   The first file specified must contain all of the job control
                   statements for the job.   Any  additional files are included
 
 
                                            Section 3:  The BATCH Command     6
 
         CMS Batch User's Guide
 
 
 
                                                                          BATCH
 
                   as data files  for use by the  job.   If only one  fileid is
                   specified (which is the usual case),  you need only supply a
                   filename,  and the default  filetype ("BATCH")  and filemode
                   ("*")  will be used.   When submitting a single file you can
                   omit the keyword "SUBMIT."
 
         Parameters
 
         ACTIVE    specifies that all  of your active jobs will  be affected by
                   the function.
 
         ALL       specifies that all of your jobs  in the batch system will be
                   affected by the function.
 
         Current   specifies that all  of your jobs in the batch  system are to
                   be checked.
 
         fileid    is the filename, filetype,  and filemode of a CMS disk file.
                   The filetype and filemode are  optional when only one fileid
                   is specified.
 
         jobid     is a job  identifier.   All jobs submitted to  the CMS batch
                   system are assigned  an identifying number.   (When  you use
                   this number,  you  need not enter any  leading zeros.)   You
                   also have the  option of providing your  own identifier when
                   you submit a  job,  or adding an identifier  with the CHANGE
                   function.
 
         Job       indicates  that  you  want  a  history  of  activity  for  a
                   specified  job.   This  history  does  not include  any  job
                   parameters.   Use the change function if you want to see job
                   characteristics.
 
         parms     are parameters that are passed to the specified macro.
 
         QUEUE     specifies that all of your jobs waiting in the queue will be
                   affected by the function.
 
         System    indicates that you want general  information about the batch
                   system's  activities.    This will  include  queue  lengths,
                   scheduling criteria, and other information.
 
         User      indicates that you want to query current status for all jobs
                   owned by a specified user.
 
         userid    specifies a particular userid.   You  may use an asterisk to
                   indicate your own userid.
 
 
 
                                            Section 3:  The BATCH Command     7
 
         CMS Batch User's Guide
 
 
 
                                                                          BATCH
 
         Options
 
         Clear     causes the  BATCH command  to clear  the terminal  screen at
                   appropriate times.  This is the default.
 
         Long      causes  BATCH  to   use  long  prompts  when   operating  in
                   interactive mode.  This is the default.
 
         Msgcount n
                   is the maximum number of messages that will be returned by a
                   QUERY function (not including header lines).  The default is
                   100.  MSGCOUNT 0 will suppress all QUERY responses.
 
         Noclear   inhibits  the screen  clearing normally  done  by the  BATCH
                   command.
 
         Short     causes  BATCH  to  use  short   prompts  when  operating  in
                   interactive mode.
 
         Job Status Codes
 
         The following job status codes are used by the BATCH QUERY function:
 
         ABN  Abnormal termination           RST  Restart in progress
         ACT  Active                         RUN  Waiting in queue (hi prio)
         CMP  Completed normally             S/U  Held by user and operator
         CRS  System crash and RESTART=NO    SKD  Selected for execution
         DSP  Dispatched, but not started    SQU  Waiting in queue (chained)
         JCE  JCL error                      SYS  Held by operator
         NUL  Null job (no commands)         TPW  Waiting for tape drive
         MCN  Cancelled by batch monitor     UAB  Abended by BATKILL command
         NOT  Not a job                      UCN  Cancelled by user
         OCN  Cancelled by operator          UNK  Unknown
         QUE  Waiting in queue               USR  Held by user
 
         Job Control Statement Summary
 
         /*   marks the end of the job or an in-stream (/FILE) file.
 
         // comment
              is a comment.  This is allowed only in batch macros.
 
         CHAIN jobid1 [jobid2 ... jobid8]
              is used to specify a list of jobs that must successfully complete
              before this job can execute.
 
         /ERROR PRINT=destination
              causes a diagnostic listing of the  job control statements in the
              job to be produced.
 
 
                                            Section 3:  The BATCH Command     8
 
         CMS Batch User's Guide
 
 
 
                                                                          BATCH
 
         /FILE filename filetype
              marks the beginning of an in-stream data file.   The file will be
              given the specified name.   The data must be terminated with a /*
              statement.
 
         /HOLD
              causes the  job to be  placed in  USER hold.   The  BATCH RELEASE
              command is used to release the job for execution.
 
         /IDENT jobname
              assigns a user job name.   This is only required for use with job
              chaining (/CHAIN).
 
         /INCLUDE filename filetype
              causes the  specified file  to be  copied to  the batch  server's
              temporary working disk.   Since your batch job has read-access to
              your A-disk  and D-disk,   files on  these disks  can usually  be
              accessed directly.    /INCLUDE is  only necessary  when the  file
              might  change while  the job  is executing,   or if  the file  is
              modified by the job.
 
         /JOB [userid username]
              is required at the beginning of  each CMS Batch job.   The userid
              and name are optional.
 
         /QUERY PRINT=destination
              specifies that you want a system status and history listing.
 
         /SET CARDS=[5000|limit]
              DUMP=[NO|YES]
              LINES=[2000|limit]
              NOTIFY=[YES|NO]
              PRINT=destination[=HOLD]
              PUNCH=destination[=HOLD]
              RATE=[DAY|NIGHT|WEEKEND|HOLIDAY]
              RESTART=[YES|NO]
              SIZE=[1|megabytes]
              TIME=[10|seconds]
              is used to set various job parameters.   CARDS,  LINES,  and TIME
              are limits for the job.
 
         Usage Notes
 
          1.  A CMS  batch job  is executed by  a special  CMS userid  called a
              "batch server."  It is logged on to execute a single job and logs
              off when the job is completed.   The batch server has read-access
              to the files on  your A-disk (and D-disk,  if you  have one)  and
              write-access  to a  500  kilobyte temporary  disk.    One or  two
              megabytes of virtual storage are provided.
 
 
                                            Section 3:  The BATCH Command     9
 
         CMS Batch User's Guide
 
 
 
                                                                          BATCH
 
          2.  Because of limitations  in CMS disk file  management,  you should
              never change the  files on your disks  that are being used  by an
              executing CMS Batch  job.   (You will receive a  message from the
              batch system when  your job begins execution.)    Since the batch
              server has only read-access to your files,  there is no danger of
              damage to the files involved,  but  changing a file that is being
              used as  input by  a batch  job will  almost certainly  cause the
              batch job to fail,  and is guaranteed to at least cause incorrect
              results.   You may alter or erase any  of your files that are not
              in use by a batch job.
 
          3.  The BATCH   command  operates   either   interactively  or   non-
              interactively.  Interactive mode is used when you do not supply a
              function or all  required parameters on the  command line.   This
              mode can be used to create all job control statements.   When the
              BATCH  command is  in interactive  mode  you can  respond to  any
              prompt with a ? if you need more information.
 
          4.  CMS batch jobs require only two  control statements:  /JOB at the
              beginning and /* at the end.  For example:
 
                   /JOB
                   SCRIPT MYFILE ( PRT
                   /*
 
              would process  a file  named "MYFILE SCRIPT"  on your  A-disk and
              send the formatted output back to your userid in a spool file.
 
          5.  Batch  macros are  similar to  XEDIT macros.    Anything that  is
              allowed in an EXEC  2 file is allowed in a  macro,  and the BATCH
              command functions (SUBMIT, QUERY, CANCEL,  etc.)  can all be used
              as subcommands within a macro.   Each  causes a return code to be
              set.  The SUBMIT function sets the EXEC 2 variables &SYSJOBID and
              &USRJOBID.  A QUERY function for a specific job sets the &JOBSTAT
              variable with a job status code.
 
          6.  More information about  the CMS Batch system is  available in the
              UKCC CMS Batch User's Guide and from the HELP command.   Try HELP
              BATCH MENU for more information about job control statements.
 
 
 
 
 
 
                                           Section 3:  The BATCH Command     10
 
         CMS Batch User's Guide
 
 
 
         Section 4:  Job Control Statements
 
 
         The only job control statements required for  all CMS Batch jobs are a
         /JOB statement at the beginning and a /* at the end.  Other statements
         are available to  control various options.   The BATCH  command can be
         used to construct all job control statements interactively.
 
         Job control statements (except /*)  must be placed at the beginning of
         your job, before any CP or CMS commands.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     11
 
         CMS Batch User's Guide
 
 
 
                                                                             /*
 
         The /* statement is  required to mark the end of your  job and the end
         of each in-stream (/FILE) file.
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /*                                                                 |
         |                                                                    |
         +--------------------------------------------------------------------+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     12
 
         CMS Batch User's Guide
 
 
 
                                                                             //
 
         The // statement is a comment.  The format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | // comment                                                         |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         Usage Note
 
         The // statement is allowed only in Batch macros.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     13
 
         CMS Batch User's Guide
 
 
 
                                                                         /CHAIN
 
         The /CHAIN  statement is  used to  specify a  list of  jobs that  must
         successfully complete before this job can execute.   The format of the
         statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /CHAIN jobid1 jobid2 ... jobid8                                    |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         Usage Note
 
         You may specify as many as eight job names.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     14
 
         CMS Batch User's Guide
 
 
 
                                                                         /ERROR
 
         The /ERROR statement  specifies that you want a  diagnostic listing of
         the job control statements.  The format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /ERROR PRINT=destination                                           |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         Usage Note
 
         The "destination" may be specified as an asterisk to cause the listing
         to be  sent to  your userid in  a spool  file,  or it  may be  an RSCS
         printer name (Pnnnn).
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     15
 
         CMS Batch User's Guide
 
 
 
                                                                          /FILE
 
         Use the /FILE statement to include data in your job stream.   The data
         records following the /FILE statement are copied to the batch server's
         temporary working  disk and  given the specified  fileid when  the job
         executes.   The  data must  be terminated with  a /*  statement.   The
         format of the /FILE statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /FILE filename filetype                                            |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         where:
 
         filename  is the filename to be given to the file.
 
         filetype  is the filetype to be given to the file.
 
         Usage Note
 
         Also see the /INCLUDE statement.
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     16
 
         CMS Batch User's Guide
 
 
 
                                                                          /HOLD
 
         The /HOLD statement causes a job to be placed in USER hold.  The BATCH
         RELEASE command is used to release a job for execution.  The format of
         the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /HOLD                                                              |
         |                                                                    |
         +--------------------------------------------------------------------+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     17
 
         CMS Batch User's Guide
 
 
 
                                                                         /IDENT
 
         The /IDENT statement is used to assign a user identifier (job name) to
         a batch job.  The format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /IDENT jobid                                                       |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         Usage Note
 
         A job name  is required only when  the job chaining facility  is used.
         The CMS batch system also assigns an identifier to each job.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     18
 
         CMS Batch User's Guide
 
 
 
                                                                       /INCLUDE
 
         Use the /INCLUDE  statement to make a  file available to a  job.   The
         file named on  the /INCLUDE statement is copied to  the batch server's
         temporary working  disk and  given the specified  fileid when  the job
         executes.  The format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /INCLUDE filename filetype                                         |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         where:
 
         filename  is the filename of the disk file to be copied.
 
         filetype  is the filetype of the disk file to be copied.
 
         Usage Note
 
         /INCLUDE is similar to /FILE,  but  /INCLUDE copies the file from your
         disk when the job is submitted.   /FILE requires that the data for the
         file be included  in the batch job.    Since your batch job  has read-
         access to your 191 and 192 minidisks, files on these disks can usually
         be accessed directly.   /INCLUDE is only necessary when the file might
         change while the job is executing,  or  if the file is modified by the
         job.
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     19
 
         CMS Batch User's Guide
 
 
 
                                                                           /JOB
 
         The /JOB statement is required at the beginning of each CMS Batch job.
         The format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /JOB [userid username]                                             |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         where:
 
         userid    is your userid.
 
         username  is your name (limited to eight characters).
 
         Usage Note
 
         If omit your userid and name, they will be automatically inserted when
         the job is submitted.
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     20
 
         CMS Batch User's Guide
 
 
 
                                                                         /QUERY
 
         The  /QUERY statement  specifies that  you  want a  system status  and
         history listing.   This will include a  CMS Batch system status report
         and all  available information  about jobs you  have submitted  to the
         system.  The format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         | /QUERY PRINT=destination                                           |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         Usage Note
 
         The "destination" may be specified as an asterisk to cause the listing
         to be  sent to  your userid in  a spool  file,  or it  may be  an RSCS
         printer name (Pnnnn).
 
 
 
 
 
 
 
 
 
 
 
 
 
                                      Section 4:  Job Control Statements     21
 
         CMS Batch User's Guide
 
 
 
                                                                           /SET
 
         The /SET statement is used to specify  a number of parameters for your
         job.    You  may  specify  multiple options  on  each  /SET  statement
         (separated by blanks)  and you may use multiple /SET statements.   The
         format of the statement is:
 
         +--------------------------------------------------------------------+
         |                                                                    |
         |       +                             +                              |
         | /SET  |CARDS=[5000|limit]           |                              |
         |       |DUMP=[NO|YES]                |                              |
         |       |LINES=[2000|limit]           |                              |
         |       |NOTIFY=[YES|NO]              |                              |
         |       |PRINT=destination[=HOLD]     |                              |
         |       |PUNCH=destination[=HOLD]     |                              |
         |       |RATE=[DAY|rate]              |                              |
         |       |RESTART=[YES|NO]             |                              |
         |       |SIZE=[1|megabytes]           |                              |
         |       |TAPE=0                       |                              |
         |       |TIME=[10|seconds]            |                              |
         |       +                             +                              |
         |                                                                    |
         +--------------------------------------------------------------------+
 
         where:
 
         CARDS=[5000|limit]
              specifies the  number of punched cards  that may be  generated by
              the batch job.  The default is 5000.  The job will be canceled if
              the limit is  exceeded.   Since the limits are  checked only once
              every minute, a job may run several records over its limit before
              being canceled.
 
         DUMP=[NO|YES]
              provides  an   automatic  dump  if   the  job  has   an  abnormal
              termination.  The default is NO.
 
         LINES=[2000|limit]
              specifies the number of print lines  that may be generated by the
              batch job.  The default is 2000.  The job will be canceled if the
              limit is exceeded.   Since the limits are checked only once every
              minute, a job may run several records over its limit before being
              canceled.
 
         NOTIFY=[YES|NO]
              controls messages sent  by the batch system to notify  you of the
              job's progress.  The default is YES.
 
         PRINT=destination[=HOLD]
 
 
                                      Section 4:  Job Control Statements     22
 
         CMS Batch User's Guide
 
 
 
                                                                           /SET
 
              specifies the  destination for  printed output  generated by  the
              batch job.  You may specify an asterisk to cause the output to be
              sent to your userid in a spool file (this is the default), or you
              may specify an RSCS printer (Pnnnn).   To route output to another
              userid,  or to a HASP remote  site,  place the appropriate SETPRT
              command in your batch job.
 
         PUNCH=destination[=HOLD]
              specifies the  destination for  punched output  generated by  the
              batch job.  You may specify an asterisk to cause the output to be
              sent to your userid in a spool file (this is the default), or you
              may specify an RSCS printer (Pnnnn).   To route output to another
              userid,  or to a HASP remote  site,  place the appropriate SETPUN
              command in your batch job.  Punched output is printed by RSCS and
              HASP; you cannot generate punched cards with a CMS batch job.
 
         RATE=[DAY|rate]
              specifies the rate period when the  job should be run.   DAY rate
              jobs will run any  time,  NIGHT rate jobs will run  at night,  on
              weekends, and on holidays,  and WEEKEND and HOLIDAY jobs will run
              only on weekends and holidays.  External users are always charged
              the same rate,  regardless of the  rate period.   RATE=DAY is the
              default.
 
         RESTART=[YES|NO]
              specifies whether or not the job can be restarted.  If the system
              should crash while the job is  running,  it will be automatically
              restarted unless RESTART=NO was specified.
 
         SIZE=[1|megabytes]
              is  the virtual  storage size  used  for the  job,  specified  in
              megabytes.   Jobs that specify large sizes  will be given a lower
              priority,  and  will not be run  at all while system  activity is
              high.
 
         TAPE=0
              specifies the number  of tapes required for the  job.   CMS batch
              jobs cannot use tapes at this  time,  and if you specify anything
              other than TAPE=0 your job will not be run.
 
         TIME=[10|seconds]
              is the time limit for the job, in CPU seconds.   This information
              is used in job scheduling,  and  jobs with higher time limits are
              not run  when the  system is  heavily loaded.    The job  will be
              canceled if it exceeds this limit.   Since the limits are checked
              only once every  minute,  a job may run several  seconds over its
              limit before being canceled.
 
 
 
                                      Section 4:  Job Control Statements     23
 
         CMS Batch User's Guide
 
 
 
                                                                          INDEX
 
 
         -&-                                  -M-
         &JOBSTAT, 10                         macros, 10
         &SYSJOBID, 10
         &USRJOBID, 10                        -R-
                                              reader, 2
         -/-
         /*, 12                               -S-
         //, 13                               SENDFILE command, 2
         /CHAIN, 14                           SETCON command, 2
         /ERROR, 15                           SETPRT command, 2
         /FILE, 16                            SETPUN command, 2
         /HOLD, 17                            spooled output, 3
         /IDENT, 18                           status codes, 8
         /INCLUDE, 19
         /JOB, 20                             -T-
         /QUERY, 21                           tapes, 3
         /SET, 22                             terminal, 2
 
         -B-                                  -X-
         BATCH, 5                             XEDIT, 2
         batch macros, 10
         batch server, 9
 
         -C-
         chaining, 14, 18
         CMS Batch, 5
         codes, 8
         CPU time, 3
 
         -D-
         disk files, 2, 10, 19
         display terminal, 2
 
         -F-
         file sharing, 2, 10
         files, 16, 19
 
         -I-
         in-stream files, 16
 
         -J-
         job chaining, 14, 18
         job control statements, 2
         job status codes, 8
 
         -L-
         limits, 3
 
 
                                                                   Index     24