.;	 Title		CATCHALL.CMD
	.ENABLE SUBSTITUTION
	.DISABLE DISPLAY

	.IFNINS	CAT	INS	$ICMFSL/TASK=...CAT

	.IF	P1 NE "WHO"	.GOTO	100$
	.SETS	$WHO	"????"
	.TESTFILE LB:[1,11]WHOISIT.CMD
	.IF	<FILERR> NE 1	.GOTO	080$
	@LB:[1,11]WHOISIT.CMD
.080$:
; [2J
; [10;02H[1;5;7m#3#4 **  '$WHO'  ** [22;25;27m
; [14;10H[1;5;7m#3#4 **  '<SYDISK>''<SYUNIT>':'<UIC>'  ** [22;25;27m
; [18;26H[1;5;7m#3#4 **  '<NETNOD>'  ** [22;25;27m
; [023;001H
;
	.DISABLE DISPLAY
	.EXIT
.100$:

	.IF	P1 NE "SEA"	.GOTO	200$
	.ENABLE DISPLAY
	@LB:[1,11]SEA 'P2' 'P3' 'P4'
	.DISABLE DISPLAY
	.EXIT
.200$:

	.IF	P1 NE "CCC"	.GOTO	300$
	.ENABLE DISPLAY
	@LB:[1,11]CCC 'P2' 'P3'
	.DISABLE DISPLAY
	.EXIT
.300$:

	.IF	P1 NE "SPL"	.GOTO	400$
	.ENABLE DISPLAY
	@LB:[1,11]SPL 'P2' 'P3'
	.DISABLE DISPLAY
	.EXIT
.400$:

	.IF	P1 NE "DTK"	.GOTO	500$
	.ENABLE	QUIET
	RMD	T,TASK='P2'
	.DISABLE DISPLAY
	.EXIT
.500$:

	.IF	P1 NE "BAT"	.GOTO	600$
	.ENABLE QUIET
	.SETS	UIC	<UIC>
	.SETS	DSK	<SYDISK>
	.SETN	UNT	<SYUNIT>
	.TESTDEVICE	TI:
	.PARSE	<EXSTRI> "," TERM EXTRA
	.SETS	DEV	<EXSTRI>
	.TEST	DEV	":"
	.SETS	TERM	DEV[1:<STRLEN>-1]
	.OPEN	BATCHMCR.TMP
	.ENABLE	DATA
$ JOB /TIME:(24:00) BATMCR '<LOGUIC>'
$ SET /UIC='<UIC>'
$ ASN '<SYDISK>''<SYUNIT>':=SY:
$ TIME
$ 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8' 'P9'
$ BRO 'TERM': ** MCR job is now done **
$ PIP BATCHMCR.TMP;*/DE
$ EOJ
.DISABLE DATA
	.CLOSE
	SET	/UIC='<LOGUIC>'
	ASN	=SY:
	PIP BATCHMCR.LOG;*/DE/NM
	SUB /NOPRINT='DSK''UNT':'UIC'BATCHMCR.TMP
	SET	/UIC='UIC'
	ASN	'DSK''UNT':=SY:
	.DISABLE DISPLAY
	.EXIT
.600$:

	.IF	P1 NE "XBAT"	.GOTO	700$
	.TEST	P2	"/TYP"
	.IF	<STRLEN> NE 0	TYP	LB:'<LOGUIC>'BATCHMCR.LOG
	.TEST	P2	"/SPL"
	.IF	<STRLEN> NE 0	;SPL	LB:'<LOGUIC>'BATCHMCR.LOG
	.DISABLE DISPLAY
	.EXIT
.700$:

	.IF	P1 NE "WAIT"	.GOTO	800$
	.ENABLE QUIET
	.XQT	CAT	@LB:[1,11]WAIT 'P2'
	.DISABLE DISPLAY
	.EXIT
.800$:

	.IF	P1 NE "MOV"	.GOTO 900$

	.SETS	UIC	<UIC>
	.SETS	NUIC	P3
 	.IF	NUIC	EQ	""	.SETS	NUIC	"'UIC'"
	.SETS	NMOD	P2
	.IF	NMOD	EQ	""	.GOTO	840$
	.TEST	NMOD	"["
	.IF	<STRLEN> NE 1	.SETS	NMOD	"'UIC'"+P2
	.SETS	DNODE	P4
	.IF	DNODE EQ ""	.SETS	DNODE	"BUFM"
	SET	/UIC='NUIC'
	PIP	FS:/NV/CD='NMOD'
.;	NFT	'DNODE'"CAT "::FS:'NUIC'='NMOD'
	SET	/UIC='UIC'
	.DISABLE DISPLAY
	.EXIT
.840$:
;
;	Error in input parameters, retry it again!
;
	.EXIT
.900$:

	.IF	P1 NE "REP"	.GOTO	1000$
.940$:
	'P2' 'P3' 'P4' 'P5' 'P6'
	.ENABLE	QUIET
	.DELAY	5S
	.DISABLE QUIET
	.GOTO	940$
	.DISABLE DISPLAY
	.EXIT
.1000$:

	.IF	P1 NE "SRP"	.GOTO	1100$
	.ENABLE DISPLAY
	@LB:[1,11]SRP 'P2' 'P3' 'P4' 'P5'
	.DISABLE DISPLAY
	.EXIT
.1100$:

	.IF	P1 NE "GO."	.GOTO	1200$
	.IF	P2 EQ "PTS"	.GOTO	1240$
	.IF	P2 EQ "ASRS"	.GOTO	1260$
	.IF	P2 EQ "BUFM"	.GOTO	1220$
	.IF	P2 EQ "FM"	.GOTO	1220$
	.IF	P1 NE ""	.GOTO	1280$
.1220$:
	SET	/UIC=[10,2]
	ASN	DU1:=SY:
	.IFNINS	CAT	INS	$ICMFSL/TASK=...CAT
	.XQT	CAT	@[1,2]TINYSTART
	.DISABLE DISPLAY
	.EXIT
.1240$:
	.TESTDEVICE PS:
	.TEST	<EXSTRI> "NSD"
	.IF	<STRLEN> NE 0	.GOTO 1280$
	SET	/UIC=[55,10]
	ASN	PS:=SY:
	.XQT	CAT @PS:PTS.SIM Y Y N
	.DISABLE DISPLAY
	.EXIT
.1260$:
	.TESTDEVICE AS:
	.TEST	<EXSTRI> "NSD"
	.IF	<STRLEN> NE 0	.GOTO 1280$
	SET	/UIC=[1,2]
	ASN	AS:=SY:
	.XQT	CAT @AS:STARTUP.SIM Y Y N N
	.DISABLE DISPLAY
	.EXIT
.1280$:
	.DISABLE QUIET
	.DISABLE DISPLAY
;
;	You blew it buddy, try typing PTS, ASRS, BUFM or FM next time!!!
;
	.EXIT
.1200$:

	.IF	P1 NE "WOA"	.GOTO	1300$
	.IF	P2 EQ "PTS"	.GOTO	1340$
	.IF	P2 EQ "ASRS"	.GOTO	1360$
	.IF	P2 EQ "BUFM"	.GOTO	1320$
	.IF	P2 EQ "FM"	.GOTO	1320$
	.IF	P1 NE ""	.GOTO	1380$
.1320$:
	SET	/UIC=[10,2]
	ASN	DU1:=SY:
	.IFNINS	CAT	INS	$ICMFSL/TASK=...CAT
	.XQT	CAT	@FS:[60,10]DNSHUT
	.DISABLE DISPLAY
	.EXIT
.1340$:
	.TESTDEVICE PS:
	.TEST	<EXSTRI> "NSD"
	.IF	<STRLEN> NE 0	.GOTO 1380$
	SET	/UIC=[55,10]
	ASN	PS:=SY:
	.XQT	CAT @PS:PTS.SIM N
	.DISABLE DISPLAY
	.EXIT
.1360$:
	.TESTDEVICE AS:
	.TEST	<EXSTRI> "NSD"
	.IF	<STRLEN> NE 0	.GOTO 1380$
	SET	/UIC=[1,2]
	ASN	AS:=SY:
	.XQT	CAT @AS:SHTDWN.SIM
	.DISABLE DISPLAY
	.EXIT
.1380$:
	.DISABLE QUIET
	.DISABLE DISPLAY
;
;	You blew it buddy, try typing PTS, ASRS, BUFM or FM next time!!!
;
	.EXIT
.1300$:

	.IF	P1 NE "TMR"	.GOTO	1400$
	.IFNINS	ITM	INS	$ICMFSL/TASK=...ITM
	.XQT	ITM	@LB:[1,11]TMR 'P2'
	.DISABLE DISPLAY
	.EXIT
.1400$:

	.IF	P1 NE "BTM"	.GOTO	1500$
	.ENABLE CONTROL-Z
	.ENABLE	ATTACH
	.ENABLE	TIMEOUT
	.DISABLE DISPLAY
	.ENABLE QUIET
	SET	/TYPEAHEAD=TI:
	.DISABLE QUIET
; [2J
.1420$:
; [12;06H[1m#3#4 **  '<TIME>' '<DATE>'  ** [22m
; [001;001H
	.ENABLE QUIET
	.ASKS	[:::2S]	QUIT
	.IFT	<EOF>	.GOTO	1440$
	.DISABLE QUIET
	.GOTO	1420$
.1440$:
	.DISABLE QUIET
; [001;001H[2J
	.EXIT
.1500$:

	.IF	P1 NE "LIST"	.GOTO	1600$
	.ENABLE QUIET
	.XQT	CAT	@LB:[1,11]LIST 'P2'
	.DISABLE DISPLAY
	.EXIT
.1600$:

	.IF	P1 NE "DMPMEM"	.GOTO	1700$
	.ENABLE QUIET
	.XQT	RUN	FS:[60,54]DBDMP/TASK=DBDMP
	.DISABLE DISPLAY
	.EXIT
.1700$:

	.DISABLE DISPLAY
;
; 'P1' 'P2' 'P3' 'P4' 'P4' 'P5' 'P6' 'P7' 'P8'
;
; ** You have made a terrible mistake!!!   I will read you your fortune.
;
	.ENABLE QUIET
	COK
	.DISABLE QUIET
;
