!  Alan L. Zirkle
!  Naval Surface Warfare Center
!  Code K53
!  Dahlgren, Virginia  22448
!  (703) 663-8023

1 BATCH

The BATCH command takes one DCL command and runs it as a batch job.

The syntax of the BATCH command is simply:

	$ BATCH  dcl_command_string

For example:

	$ BATCH  FORTRAN MYFILE

BATCH constructs a command file to run the specified command, then submits
it to the batch queue SYS$BATCH.  It attempts to reproduce, in the batch
job, the current environment at the time the BATCH command was done.
Specifically:

  *  Like all batch jobs, it begins by executing your LOGIN.COM (if any).

  *  It runs in your current default directory.  If this directory con-
     tains a command procedure named SDENTRY.COM, the batch job runs it
     before doing your command.

If your command requires any other special conditions (such as executing
any special setup procedures other than in the LOGIN.COM and the one
SDENTRY.COM), the batch job will fail.

The batch job creates a log file, which is NOT automatically printed.  The
log is created in subdirectory [.LOGS] under your main login directory; if
this directory does not exist, BATCH creates it (after asking your permis-
sion).  The name given to the log file is computed from the command string:
if you are running a program, it will be the program name; if you are doing
a DCL command, it will be the command verb; if you are invoking a command
procedure, it will be the procedure name.  The file type will always be
.LOG.  After BATCH submits the job, it displays a message giving the log
file's name and location.

It is important that you delete these log files when you no longer need
them, since they use up space on your disk.

BATCH has two optional qualifiers which allow you to modify its oper-
ation.  When used, these must be specified BEFORE the command string.

    If /NAME=xxx is specified, the batch log file is named xxx.LOG instead
    of having a name computed from the command string.

    If /UNIQUE is specified, the batch queue ordinal number assigned by VMS
    is appended to the batch log file name.  This can help you keep track
    of multiple jobs which would otherwise have the same name.

You will get a message on the screen when the batch job has completed.
If your command had an error, this message will include the text of the
error message.

BATCH creates two DCL Symbols which can be used as commands to help manage
your log files.  If you execute TLOG after doing a BATCH, it will type the
last batch log file created.  If you execute DLOG, it will DELETE the last
batch log file created.  Please note that if you have more than one BATCH
going at a time, you may not type (or delete) the expected file.

Your LOGIN.COM should not execute any commands which are not legal in
batch mode; SETUP and SET TERMINAL are examples.  Such commands can be
kept if you include constructs like the following example:

	$  IF F$MODE() .EQS. "BATCH"  THEN  GOTO NO_TTY
	$!
	$  SETUP TABS
	$  SET TERMINAL /LINE_EDIT
	$!
	$ NO_TTY:
	 . . .

