$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! $! This command procedure will retreive Voyager SFOS reports/ $! $! Written by Tim McClanahan and Sandy Kramer $! $! Original source $! 04/18/2000 $! Revisions $! 05/18/2000 $! $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! $! enable DCL command interpreter error checking $! $ set on $! $! exit to home directory on CTRL-Y command $! $ on control_y then goto INTERRUPT $! $ wo :== write sys$output $ ask:== inquire $! $! exit to home directory on error $! $ on error then goto ERROR $! $! SFOS retrieval directory $! $ set def sys$login $ set def [.sfos] $ show default $! $ AGAIN: $ wo "" $ wo " ================================================" $ wo " ====== VOYAGER SFOS RETRIEVAL SYSTEM =====" $ wo " ================================================" $ wo "" $! $! Login to JPL Voyager MAG system $! $ ask id " Enter the JPL (shock) ID" $ set terminal/noecho $ ask pass " Enter the PASSWORD" $ set terminal/echo $ id = f$edit(id,"trim,lowercase") $ pass = f$edit(pass,"trim,lowercase") $ wo "" $ wo "Checking current file listing..." $ wo "" $ open/write ftplook ftplook.dat $ write ftplook "pwd" $ write ftplook "dir *sfos.ps" $ write ftplook "exit" $ close ftplook $! $ ftp /username='id'/password='pass' shock.jpl.nasa.gov /novms_structure/take_file=ftplook.dat $! delete/noconfirm ftplook.dat;* $ wo "" $! $! Enter desired number of SFOSs for retrieval $! $ ask numsfos " Enter the number of SFOSs to be reblocked" $ numsfos = f$integer(numsfos) $ if numsfos .eqs. 0 then goto END $ sfoscnt = 1 $! $ ANOTHER_SFOS: $ if sfoscnt .gt. numsfos then goto RUN_REBLCK $ ask file'sfoscnt' " Enter SFOSs filename "'sfoscnt' $ file'sfoscnt' = f$edit(file'sfoscnt',"trim,lowercase") $ sfoscnt = sfoscnt + 1 $ goto ANOTHER_SFOS $! $ RUN_REBLCK: $ wo "" $ wo " Are these PARAMETERS correct?" $ sfoscnt = 1 $ wo "" $ wo " JPL (shock) ID = ",id $ wo "" $! $ WRITCHK: $ if sfoscnt .gt. numsfos then goto CHECK $ wo " FILE #",sfoscnt," = ",file'sfoscnt' $ sfoscnt = sfoscnt + 1 $ goto WRITCHK $! $ CHECK: $ wo "" $ ask yesno " Enter (Y/N)" $ if yesno .eqs. "N" then goto AGAIN $ sfoscnt = 1 $! $! FTP session created and submitted for recovery from JPL $! $ open/write ftp_file FTPFILE.DAT $ write ftp_file "type ascii" $! $ FTPSESSION: $ if sfoscnt .gt. numsfos then goto GOTTEN $ file = file'sfoscnt' $ dot = f$locate(".",file) $ part1 = f$extract(0,dot,file) $ part2 = "_sfos.ps" $ write ftp_file "get ",file," ",part1,part2 $ sfoscnt = sfoscnt + 1 $ goto FTPSESSION $! $ GOTTEN: $ wo "" $ wo " BEGIN FILE TRANSFER" $ wo " -------------------" $ wo "" $ write ftp_file "exit" $ close ftp_file $! ftp/username='id'/password='pass' 137.79.99.202 /novms_structure/- $ ftp /username='id'/password='pass' shock.jpl.nasa.gov /novms_structure/take_file=FTPFILE.DAT $ delete/noconfirm FTPFILE.DAT; $! $ wo "" $ wo "*** Processing completed ***" $ wo "" $! $ exit $! $ ERROR: $! $ wo "" $ wo "*** Processing terminated by error ***" $ wo "" $! $ if f$search("for005.dat") .nes. "" $ then $ close for005 $ delete for005.dat; $ endif $ set noon $ set def sys$login $ exit $! $ INTERRUPT: $! $ wo "" $ wo "*** Processing terminated by user ***" $ wo "" $! $ if f$search("for005.dat") .nes. "" $ then $ close for005 $ delete for005.dat; $ endif $ set noon $ set def sys$login $ set terminal/echo $ exit