$! $! EDRLIST.COM $! $! This procedure submits a batch job to reblock Voyager EDRs. $! $! Unblocked EDRs are read from the directory "indir" and reblocked $! the directory "outdir". Expect ".EDR" extension on unblocked $! EDRs and ".DAT" extension on reblocked EDRs. $! $! Written by Sandy Kramer, HSTX, code 692, NASA GSFC, 08/05/96 $! $ open/write convert sys$login:EDRLIST.com $! $ inquire scid "Enter spacecraft id (1 or 2)" $ if scid .eq. 1 then ascid = "A" $ if scid .eq. 2 then ascid = "B" $ inquire year "Enter year (00-99)" $ write convert "$ indir :== VOYAGER:[VOYAGER.DATA.EDR]" $ write convert "$ indir2 :== VOYAGER:[VOYAGER.DATA.EDR]E",YEAR,ASCID $ write convert "$ inext :== .DAT" $! $! Dump time tag listing of EDR files $! $ write convert "$ SET DEF SYS$LOGIN" $ write convert "$ DIRECTORY 'INDIR2'*.DAT /COL=1 /NOHEAD /NOTRAIL /OUTPUT=SYS$LOGIN:EDRLIST.DAT" $ write convert "$ OPEN INFILE EDRLIST.DAT" $ write convert "$ CNT = 0" $ write convert "$ LOOP:" $ write convert "$ CNT = CNT + 1" $ write convert "$ READ /END=END_LOOP INFILE REC" $ write convert "$ DIR_POSITION = 'F$LOCATE("".DAT"",REC)'" $ write convert "$ NAME_POSITION = 'F$LOCATE(""]"",REC)' + 1" $ write convert "$ LENGTH = DIR_POSITION - NAME_POSITION + 3" $ write convert "$ NAME := 'F$EXTRACT(NAME_POSITION,LENGTH,REC)'" $ write convert "$ NAME'CNT' = NAME" $ write convert "$ GOTO LOOP" $ write convert "$ END_LOOP:" $ write convert "$ CLOSE INFILE" $! $ write convert "$ num = cnt - 1" $ write convert "$ cnt = 0" $ write convert "$ loop2: $ write convert "$ cnt = cnt + 1" $ write convert "$ infile = name'cnt'" $ write convert "$ length = 'f$locate("".DAT"",infile)'" $ write convert "$ name := 'f$extract(0,length,infile)'" $ write convert "$ infile = indir + name + inext" $ write convert "$ open/write for005 for005.dat" $ write convert "$ write for005 infile" $ write convert "$ close for005" $!write convert "$ write sys$output ""Dumping file "",infile" $ write convert "$ open/read for005 for005.dat" $ write convert "$ run VOYAGER:[voyager.executable]edrdump $ write convert "$ close for005" $ write convert "$ delete/noconfirm for005.dat;" $ write convert "$ if ( cnt .lt. num ) then goto loop2" $! $ write convert "$ DELETE/NOCONFIRM SYS$LOGIN:EDRLIST.DAT;*" $ write convert "$ exit" $ close convert $ submit/notify sys$login:EDRLIST.com $ exit