	.enable substitution
	.enable quiet
	.;
	.; JOB - Build batch control file for command file.
	.;
	.;	@JOB command-file ...
	.;
	.setf dcl
	.if <cli> = "DCL" .sett dcl
	.;
	.sets prouic <uic>
	.;
	.sets olddev <sydisk>+"'<syunit>':"
	.sets olduic <direct>
	.if olduic = "[]" .sets olduic <uic>
	.;
	.translate sys$login
	.parse <exstri> ":]" logdev loguic tmp
	.sets logdev logdev+":"
	.sets loguic loguic+"]"
	.;
.1000:	.if p1 = "" .asks p1 Command filename
	.;
	.parse p1 "." tmp1 tmp2
	.if tmp2 = "" .sets p1 p1+".cmd"
	.;
	.testfile 'p1'
	.if <filerr> = 1 .goto 2000
		;
		; *** Invalid command filename: 'p1' ***
		;
		.sets p1 ""
		.goto 1000
	.;
.2000:	.sets cmd <filspc>
	.parse cmd "]." tmp1 nam tmp2
	.ift dcl               set default 'logdev''loguic'
	.iff dcl .ift <privil> set uic 'loguic'
	.iff dcl               set /def='logdev''loguic'
	.iff dcl .ift <privil> set /uic='loguic'
	.testfile login.cmd
	.setn log <filerr>
	.;
	.open 'nam'.ctl
	.data $ job 'loguic'
	.if log = 1 .data $ @login batch
	.ift dcl .data $ set  def 'olddev''olduic'
	.iff dcl .data $ set /def='olddev''olduic'
	.data $ @'cmd' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' 'p9'
	.data $ eoj
	.close
	.;
	.ift dcl submit /noprint/delete 'nam'.ctl
	.iff dcl submit /noprint='nam'.ctl/de
	.;
	.ift dcl               set default 'olddev''olduic'
	.iff dcl .ift <privil> set uic 'prouic'
	.iff dcl               set /def='olddev''olduic'
	.iff dcl .ift <privil> set /uic='prouic'
