.; This is a command file to execute commands on the GRA DECNET system.
.; It should be in CM:[1,55] and to invoke it issue:   GRA command
.; If no command is issued it will prompt for a set of commands from the
.; issuers terminal.  Remember the command is executed in the context of
.; GRA's operator console.  If the command line form is used the command
.; file is executed in SILENT mode.
.ENABLE SUBSTITUTION
.ENABLE SILENT
.SETS UIC <UIC>
SET /UIC=[1,1]
.WAIT SYS
.OPEN LB:[1,1]GRACMD.TMP
.IFNDF $P1 .GOTO INPUT
.SETS LINE $P1
.IFNDF $P2 .GOTO OUT
.SETS LINE LINE+" "+$P2
.IFNDF $P3 .GOTO OUT
.SETS LINE LINE+" "+$P3
.IFNDF $P4 .GOTO OUT
.SETS LINE LINE+" "+$P4
.IFNDF $P5 .GOTO OUT
.SETS LINE LINE+" "+$P5
.IFNDF $P6 .GOTO OUT
.SETS LINE LINE+" "+$P6
.IFNDF $P7 .GOTO OUT
.SETS LINE LINE+" "+$P7
.GOTO OUT
.INPUT:
; Enter commands to be executed on GRA.
; End the list of commands with a null command.
.HIM: .ASKS LINE Command
.IF LINE = "" .GOTO SEND
.DATA 'LINE'
.GOTO HIM
.OUT:	.DATA .ENABLE SILENT
	.DATA 'LINE'
.SEND:	.CLOSE
 PLE GRA_DK:[1,1]=LB:[1,1]GRACMD.TMP/CM
.WAIT PLE
ERA LB:[1,1]GRACMD.TMP
.WAIT PIP
SET /UIC='UIC'
.WAIT SYS
