$! $! 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..." $ wo "" $ mount/over=id/media=cdrom/undef=(fixed:none:512) DKA400: $ wo "" $ endif $ ask path "Input EDR directory path" $ ask file "Input EDR filename" $!ask ext "Input EDR name extension" $ ext = "EDR" $! $ REBLOCK: $ open/write for005 for005.dat $ infile = dev + ":[" + path + "]" + file + "." + ext $ outfile = "VOYAGER:[VOYAGER.DATA.EDR]" + file + ".DAT" $ write for005 infile $ write for005 outfile $ close for005 $ open/read for005 for005.dat $ run VOYAGER:[voyager.executable]edrblock $ close for005 $ delete/noconfirm for005.dat;* $ if dev .eqs. "DKA400" then dismount dka400: $ if dev .nes. "DKA400" then delete/noconfirm 'infile';* $! $ END: $ wo "" $ exit $! $ ERRMSG: $ wo "" $ wo "RUNTIME ERROR ENCOUNTERED. PROCEDURE TERMINATED." $ wo "" $ set noon $ close for005 $ delete/noconfirm for005.dat;* $ if dev .eqs. "DKA400" then dismount dka400: $ exit