$ tape = 0 $ inquire input "Device to restore files to (SYS$SYSDEVICE:)" $ if input.eqs."" then input:=sys$sysdevice: $ input= input-":" + ":" $ inquire media "Drive containing Backup media (ddcu:)" $ if f$locate("::",media).ne.f$len(media) then goto dosysave $ media=media-":"+":" $ tape = f$getdvi(media,"devclass") .eq. 2 $ all 'media $ retry1: $ if p1.nes."" then goto checkquota $ if tape then write sys$output "Mount save media on drive ''media'" $ if .not. tape then write sys$output "Mount system specific save media on drive ''media'" $ inquire ask "* Are you ready" $ if .not. ask then goto retry1 $ mount/forei 'media $dosysave: $ if p1.nes."" then goto checkquota $ on error then continue $ create/dir sys$sysroot:[sysexe.old] $ rewind="" $ if tape then rewind = "/rewind" $ backup/verify/noassist'rewind' - 'media'sysexe.sav/save sys$sysroot:[sysexe.old]*.*;*/owner=[1,4] $ if tape then rewind="/norewind" $ on error then continue $ create/dir sys$sysroot:[sysmgr.old] $ backup/verify/noassist'rewind' - 'media'sysmgr.sav/save sys$sysroot:[sysmgr.old]*.*;*/owner=[1,4] $ if f$locate("::",media).ne.f$len(media) .or. tape then goto next_uic $ dism 'media $checkquota: $next_uic: $ inquire ask "Are there any user save sets" $ if .not. ask then goto endit $ inquire uic "Uic for the saveset ([nnn,nnn])" $ uic_nobracket=uic-"["-"]" $ comma=f$locate(",",uic_nobracket) $ uicnam=f$extract(0,comma,uic_nobracket)+"_"+f$extract(comma+1,f$length(uic_nobracket),uic_nobracket) $ if f$locate("::",media).ne.f$len(media) .or. tape then goto dobackup $retry: $ WRITE SYS$OUTPUT "Please place first diskette for user ''uic' in drive ''media'" $ inquire ask "* Are you ready" $ if .not. ask then goto retry $ mount/forei 'media $dobackup: $ set noon $ backup/verify/noassist'rewind' - 'media''uicnam'.sav/save 'input'[*...]*.*;*/owner=['uic_nobracket'] $ set on $ if f$locate("::",media).ne.f$len(media) .or. tape then goto next_uic $ dism 'media $goto next_uic $endit: $no_dismount: $ if tape then dism/nounl 'media' $ write sys$output " ****** User Restore complete ******" $exit