	.enable substitution,control-z,escape
	.disable display,lowercase,timeout
.;
	mount/for mu0:
	.if <exstat> eq 1 .goto tapeok
!
! Error -- could not mount MU0:
!
	.exit 2
.tapeok:
	.testfile lb:[sysmgr]user.dat
	.if <filerr> eq 1 .goto fileok
	@lb:[sysmgr]userdat.gen
	.testfile lb:[sysmgr]user.dat
	.if <filerr> eq 1 .goto fileok
!
! Error -- on LB:[sysmgr]USER.DAT '<filerr>'
!
	dismount/sil mu0:
	.exit 2
.fileok:
	.testfile lb:[sysmgr]uaf.sys
	.if <filerr> ne 1 .goto norem
	set file/remove lb:[sysmgr]uaf.sys;*
.norem:	set file/enter=lb:[sysmgr]uaf.sys lb:[000000]rsx11.sys
	backup /rew/mou/save=sysmgr lb:[sysmgr] mu0:
	set file/remove lb:[sysmgr]uaf.sys;1
	purge/nowarning lb:[001002]sysparam.dat,startup.cmd,user.cmd,insfxat.cmd,edtsys.edt
	backup /app/mou/save=001002 lb:[001002]sysparam.dat,startup.cmd,user.cmd,insfxat.cmd,edtsys.edt mu0:
	purge/nowarning lb:[003054]col.cmd,work.cmd,ssi.tsk,frc.tsk,slpfsl.tsk
	backup /app/mou/save=003054 lb:[003054]col.cmd,work.cmd,ssi.tsk,frc.tsk,slpfsl.tsk mu0:
	show time
	.openr lb:[sysmgr]user.dat
.loop:
	.read direct
	.ift <eof> .goto done
	backup /mou/app/save='direct' lb:['direct'] mu0:
	show time
	.goto loop
.done:
	.close
	backup /rew/list mu0:
	dismount/sil mu0:
	.exit
