.ENABLE SUBSTITUTION
.SETS NXJ ""
.SETS UIC "LB0:[10,25]"			; UIC for all batch files
.SETS VTPAR "DRVPAR"			; Partition for VT: driver
.IF VTPAR EQ "GEN" .SETS VTPAR VTPAR+"/HIGH"
.SETS SIZE "25."			; Maximum queue size
.IFNINS ...BAT INS 'UIC'BAT
.IFNINS ...STA INS 'UIC'STACK
.IFNINS BATMAN INS 'UIC'BATMAN
.IFNLOA VT: LOA VT:/PAR='VTPAR'
BAT /RUNDOWN
RUN BATMAN 1S
.ENABLE QUIET
.DELAY 1S
.DISABLE QUIET
.ASK CRASH Restore queue after system crash
.IFF CRASH .GOTO 15
; *** ENSURE CRASH TAPE IS LOADED AND ONLINE
.5: .ASK CONT Continue
.IFT CONT .GOTO 10
.DELAY 30.S
.GOTO 5
.10:
BAT /QUESIZE:100.		! MAKE SURE THERE''S ENOUGH QUEUE SPACE
RUN 'UIC'CQR
.IF <EXSTAT> EQ 1 .GOTO 12
SET /UIC=[1,54]
; A PROBLEM OCCURRED WITH CQR. WE WILL PAUSE WHILE YOU CORRECT IT.
; YOU MUST THEN RUN CQR MANUALLY
.PAUSE
.GOTO 35
.12: SET /UIC=[1,54]
; *** CRASH DUMP TAPE CAN BE UNLOADED NOW
.GOTO 35
.15:
.ASK RQFILE Restore queue from file
.IFF RQFILE .GOTO 30
RUN 'UIC'BATREST
.ASK DEFILE Delete all old Batch queue files
.IFT DEFILE PIP [1,54]BATQUEUE.BAT;*/DE/LD
.GOTO 35
.30: .ASKS NXJ Next job number
.35: BAT /RUNJOBS/QUESIZE:'SIZE'/NEXTJOB:'NXJ'
.40: .ASK SPOOL Spool any remaining log files
.IFF SPOOL .EXIT
PIP [1,71]/LI
.ASK STILL Do you still want to spool all the files
.IFT STILL PRINT CRASH/FL/LE:60.=[1,71]*.LOG;*/DEL
