$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! $! FTPEDR.COM $! $! This command procedure will retreive EDR's and place them in $! in the EDR directory voyager:[VOYAGER.DATA.EDR] $! $! S. Kramer 07/20/94 based on Quicklook command procedure $! written by T. McClanahan $! $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! $! enable DCL command interpreter error checking $! $ set on $ on control_y then goto END $ on warning then goto ERRMSG $ on error then goto ERRMSG $! $ set def voyager:[voyager.data.edr] $! $ wo :== write sys$output $ ask:== inquire $ clr :== @sys$system:clear.com $! $ AGAIN: $ clr $ wo " " $ wo " ================================================" $ wo " ====== EDR FILE RETRIEVAL ROUTINE =========" $ wo " ================================================" $ wo " " $! $! Login to JPL Voyager MAG system $! $ JPLID: $ ask id " Enter the JPL (sonic) ID" $ if id .eqs. "" then goto JPLID $ set terminal/noecho $ JPLPASS: $ ask pass " Enter the PASSWORD" $ if pass .eqs. "" then goto JPLPASS $ set terminal/echo $ id = f$edit(id,"trim,lowercase") $ pass = f$edit(pass,"trim,lowercase") $! $! Enter desired number of EDR's for retrieval $! $ ask numedrs " Enter the Number of EDR's to be reblocked" $ numedrs = f$integer(numedrs) $ if numedrs .eqs. 0 then goto END $ edrcnt = 1 $! $ ANOTHER_EDR: $ if edrcnt .gt. numedrs then goto RUN_REBLCK $ ask file'edrcnt' " Enter EDR filename "'edrcnt' $ file'edrcnt' = f$edit(file'edrcnt',"trim,lowercase") $ edrcnt = edrcnt + 1 $ goto ANOTHER_EDR $! $ RUN_REBLCK: $ wo " " $ wo " Are these PARAMETERS correct?" $ edrcnt = 1 $ wo " " $ wo " JPL (sonic) ID = ",id $ wo " " $! $ WRITCHK: $ if edrcnt .gt. numedrs then goto CHECK $ wo " FILE #",edrcnt," = ",file'edrcnt' $ edrcnt = edrcnt + 1 $ goto WRITCHK $! $ CHECK: $ wo " " $ ask yesno " Enter (Y/N)" $ if yesno .eqs. "N" then goto AGAIN $ edrcnt = 1 $! $! FTP session created and submitted for recovery from JPL $! $ open/write ftp_file FTPFILE.DAT $ write ftp_file "type i" $! $ FTPSESSION: $ if edrcnt .gt. numedrs then goto GOTTEN $ file = file'edrcnt' $ write ftp_file "get ",file," ",file $ edrcnt = edrcnt + 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/- take_file=FTPFILE.DAT $ delete FTPFILE.DAT;* $! $! Rename FTP'd EDR's $! $ edrcnt = 1 $ wo "" $ wo "Rename FTP'd EDR's to proper naming convention ( YY[A,B]DDD )" $ wo "" $ RENAME: $ file = file'edrcnt' $ if file .eqs. "" then goto ERRMSG $ ask name "Rename file ''file' to " $ if f$extract(2,1,name) .nes. "A" .and. - f$extract(2,1,name) .nes. "B" $ then $ wo "" $ wo "Invalid name. Try again." $ wo "" $ goto RENAME $ endif $ rename 'file' 'name'.edr $ edrcnt = edrcnt + 1 $ if edrcnt .le. numedrs then goto RENAME $ wo " " $ goto END $! $ ERRMSG: $ wo "" $ wo "RUNTIME ERROR ENCOUNTERED" $! $ END: $ wo "" $! $! return to home directory $! $ set def sys$login $! $ exit