.!
.!  File:	BAT.RNH
.!
.!  Author:	Hunter Goatley
.!
.!  Date:	May 20, 1991
.!
.!  Description:
.!
.!	RUNOFF source file for BAT on-line help.
.!
.!	To build:	$ RUNOFF BAT.RNH
.!			$ LIBR/HELP/INSERT libr BAT
.!
.!  Modification history:
.!
.!	01-001		Hunter Goatley		20-MAY-1991 15:59
.!		Genesis.
.!
.lm4 .rm72
.indent -4
1 BAT
.br
BAT will submit a series of commands to a batch queue, eliminating the need
for the user to manually create a command procedure to perform the tasks.
.sk
Commands to be executed in batch may be specified on the command line;
multiple commands can be separated by "|".  If commands are not given
on the command line, BAT will prompt for commands until a null line or CTRL-Z
is entered.
.sk
The temporary command procedure that is created contains commands to set
VERIFY and to change the default directory for the batch job to the current
default directory of the process running BAT.
.sk
Format:
.sk;.lm+4
$ BAT [/qualifiers] [command [|command...]]
.lm-4
.indent -4
2 Parameters
.sk;.indent -4
[/qualifiers]
.sk
All BAT qualifiers must immediately follow the BAT verb to be recognized as
BAT qualifiers.
.sk;.indent -4
[command [|command...]]
.sk
A command or list of commands that are to be executed in batch.  Multiple
commands separated by "|" (vertical bar) may be specified.
.sk
.indent -4
2 Qualifiers
.sk
.!------------------------------------------------------------------------------
.indent -4
/AFTER
.sk;.indent -1
/AFTER=time
.br;.indent -1
/NOAFTER
.sk
Requests that the job be held until after a specific time. If the specified time
has passed already, the job is processed immediately.
.sk
You can specify time as either an absolute time or as a combination of absolute
and delta times. For complete information on specifying time values, see the VMS
DCL Concepts Manual.
.sk
.!------------------------------------------------------------------------------
.indent -4
/CPUTIME
.sk;.indent -1
/CPUTIME=time
.sk
   Defines a CPU time limit for the batch job. You can specify time
   as delta time, 0, INFINITE, or NONE. If the queue on which the
   job executes has a defined CPUMAXIMUM value, the smaller of the
   SUBMIT command and queue values is used. If the queue on which
   the job executes does not have a specified maximum CPU time limit,
   the smaller of the SUBMIT command and user authorization file
   (UAF) values is used. If the queue on which the job executes
   does not have a specified maximum CPU time limit and the UAF has
   a specified CPU time limit of NONE, either the value 0 or the
   keyword INFINITE allows unlimited CPU time. If you specify the
   keyword NONE, the specified queue or UAF value is used. CPU time
   values must be greater than or equal to the number specified by
   the SYSGEN parameter PQL_MCPULM.
.sk
Unlike many DCL commands, if days are specified, the delta time must be
enclosed in quotes.
.sk
.!------------------------------------------------------------------------------
.indent -4
/HOLD
.sk;.indent -1
/HOLD
.br;.indent -1
/NOHOLD (default)
.sk
   Controls whether the job is made available for immediate
   processing. The /HOLD qualifier holds the job until it is released
   by the SET ENTRY/RELEASE or the SET ENTRY/NOHOLD command.
.sk
.!------------------------------------------------------------------------------
.indent -4
/NAME
.sk;.indent -1
/NAME=job-name
.sk
   Names the job (and possibly the batch job log file). The job name
   must be 1 to 39 alphanumeric characters. If characters other than
   alphanumeric characters, underscores (_),  or dollar signs ($)
   are used in the name, enclose the name in quotation marks (" ").
   The default job name is the name of the first file in the job.
.sk
.!------------------------------------------------------------------------------
.indent -4
/PRIORITY
.sk;.indent -1
/PRIORITY=n
.sk
   Requires OPER (operator) or ALTPRI (alter privilege) privilege to
   specify a priority greater than the value of the SYSGEN parameter
   MAXQUEPRI.
.sk
   Specifies the job-scheduling priority for the batch job with
   respect to other jobs in the same queue. The value of n is an
   integer in the range of 0 to 255, where 0 is the lowest priority
   and 255 is the highest.
.sk
   The default value is the value of the SYSGEN parameter DEFQUEPRI.
   No privilege is needed to set the priority lower than the
   MAXQUEPRI value.
.sk
   The /PRIORITY qualifier has no effect on the job's process
   execution priority. The job's process execution priority is
   determined by the base priority attribute of the INITIALIZE/QUEUE
   /BASE_PRIORITY command.
.sk
.!------------------------------------------------------------------------------
.indent -4
/QUEUE
.sk;.indent -1
/QUEUE=queue-name[:]
.sk
   Identifies the batch queue on which the job is entered. The
   default queue is SYS$BATCH.
.sk
.!------------------------------------------------------------------------------
.indent -4
/USER
.sk;.indent -1
/USER=username
.sk
   Requires CMKRNL (change mode to kernel) privilege and read (R)
   and write (W)  access to the user authorization file (UAF).
.sk
   Allows you to submit a job on behalf of another user. The job
   runs exactly as if that user had submitted it. The job runs
   under that user's user name and user identification code (UIC),
   and accounting information is logged to that user's account.
   By default, the user identification comes from the requesting
   process. The username qualifier value can be any user name that is
   validated on your system. The name must be 1 to 12 alphanumeric
   characters.
.sk
.!------------------------------------------------------------------------------
.indent -4
/WSDEFAULT
.sk;.indent -1
/WSDEFAULT=n
.sk
   Defines for a batch job a working set default, the default number
   of physical pages that the job can use. If the queue on which the
   job executes has a nonzero default working set, the smaller of
   the specified job and queue values is used. If the queue on which
   the job executes has a working set default of 0, the smaller of
   the specified job and UAF values (value established in the user
   authorization file) is used. If you specify the value 0 or NONE,
   the specified queue or UAF value is used. Working set default
   values must range between the numbers specified by the SYSGEN
   parameters PQL_MWSDEFAULT and WSMAX.
.sk
.!------------------------------------------------------------------------------
.indent -4
/WSEXTENT
.sk;.indent -1
/WSEXTENT=n
.sk
   Defines for the batch job a working set extent, the maximum
   amount of physical memory that the job can use. The job uses
   the maximum amount of physical memory only when the system has
   excess free pages. If the queue on which the job executes has a
   nonzero working set extent, the smaller of the specified job and
   queue values is used. If the queue on which the job executes has a
   working set extent of 0, the smaller of the specified job and the
   value established in the user authorization file (UAF) is used. If
   you specify the value 0 or NONE, the specified queue or UAF value
   is used. Working set extent values must range between the numbers
   specified by the SYSGEN parameters PQL_MWSEXTENT and WSMAX.
.sk
.!------------------------------------------------------------------------------
.indent -4
/WSQUOTA
.sk;.indent -1
/WSQUOTA=n
.sk
   Defines for the batch job a working set quota, the amount of
   physical memory that the job is guaranteed. If the queue on which
   the job executes has a nonzero working set quota, the smaller of
   the specified job and queue values is used. If the queue on which
   the job executes has a working set quota of 0, the smaller of the
   specified job or the value established in the user authorization
   file (UAF) is used. If you specify the value 0 or NONE, the
   specified queue or UAF value is used. Working set quota values
   must range between the numbers specified by the SYSGEN parameters
   PQL_MWSQUOTA and WSMAX.
.!------------------------------------------------------------------------------
.sk;.indent -4
2 Reading__From__SYS$INPUT
.br;
In a batch job, SYS$INPUT is defined as the command procedure itself.  BAT
treats all input lines as implicit DCL commands; in order to specify data
to be read by a program, the DECK and EOD (end of deck) keywords should
be used.  See subtopic Examples for an example of the use of DECK and EOD.
.!------------------------------------------------------------------------------
.sk;.indent -4
2 Examples
.br;
.literal
1.  $ BAT SHOW USER|SHOW SYSTEM|SHOW TIME
    Job BATCHTMP ... started on ...
.end literal
.sk
In this example, 3 commands have been entered on the command line.  The
three commands will all be executed by a single batch job.
.sk
.literal
2.  $ BAT
    _Command: SHOW USER
    _Command: SHOW SYSTEM
    _Command: SHOW TIME
    _Command:
    Job BATCHTMP ... started on ...
    $
.end literal
.sk
In this example, no commands were given on the command line, so BAT prompts
for individual commands.
.sk
.literal
3.  $ BAT
    _Command: MAIL
    _Command: DECK
    _Deck: PURGE/RECLAIM
    _Deck: COMPRESS
    _Deck: EOD
    _Command:
    Job BATCHTMP ... started on ...
    $
.end literal
.sk
In this example, the DECK and EOD keywords are used to allow program
input from SYS$INPUT.
.sk
