$! $! Command procedure to invoke EDR reblocking routine $! $ set on $ on control_y then goto END $ on warning then goto ERRMSG $ on error then goto ERRMSG $! $ wo :== write sys$output $ ask :== inquire $ clr :== @sys$system:clear.com $! $ set def VOYAGER:[voyager.command] $! $ START: $ clr $ wo " VOYAGER EDR REBLOCKING PROGRAM DRIVER" $ wo "" $ wo "" $ wo "" $ wo "Expected input format:" $ wo "" $ wo " DEVICE:[DIRECTORY PATH]FILENAME.EXTENSION" $ wo "" $ wo " ex. 1) DKA400:[VOYAGER.V2.EDR.Y89]E89B001.EDR" $ wo " ex. 2) VOYAGER:[VOYAGER.DATA.EDR]94B001.EDR" $ wo "" $ ask dev "Input EDR device name" $ if dev .eqs. "DKA400" $ then $! $ CDMOUNT: $ wo "" $ wo "CDROM mount required." $ ask ans "Is CDROM media in drive (y/n)?" $ if ans .eqs. "n" .or. ans .eqs. "N" $ then $ wo "" $ ask ans "Continue (y/n)?" $ if ans .eqs. "n" .or. ans .eqs. "N" then goto END $ clr $ goto CDMOUNT $ endif $! wo "Mounting CDROM..." $! mount/over=id/media=cdrom/undef=(fixed:none:512) DKA400: $! wo "" $ endif $! $ INFILE: $ wo "" $ ask path "Input EDR directory path" $ wo "" $ ask file "Input EDR filename" $!ask ext "Input EDR name extension" $ ext = "EDR" $! $ REBLOCK: $ infile = dev + ":[" + path + "]" + file + "." + ext $ wo "" $ wo "Selected input file : ",infile $ inquire ans "Is input file name correct (y/n)" $ if ans.nes."Y" .and. ans.nes."y" then goto infile $ outfile = "VOYAGER:[VOYAGER.DATA.EDR]" + file + ".DAT" $ wo "" $ wo "Output file : ",outfile $ open/write batch sys$login:edrblock.com $ if dev .eqs. "DKA400" $ then $ write batch "$ mount/over=id/media=cdrom/undef=(fixed:none:512) DKA400:" $ endif $ write batch "$ set on" $ write batch "$ on error then exit" $ write batch "$ run VOYAGER:[voyager.executable]EDR_REBLOCK_SORT.EXE" $ write batch "''infile'" $ write batch "''outfile'" $ if dev .eqs. "DKA400" $ then $ write batch "$ dismount dka400:" $ endif $ if dev .nes. "DKA400" then write batch "$ delete/noconfirm ''infile';" $ write batch "$ exit" $ close batch $ wo "" $ wo "Submitting batch EDR reblocking job..." $ wo "" $ submit/noprint/notify/log=sys$login sys$login:edrblock.com $! $ END: $ wo "" $ exit $! $ ERRMSG: $ wo "" $ wo "RUNTIME ERROR ENCOUNTERED. PROCEDURE TERMINATED." $ wo "" $ close batch $ set noon $ exit