;file XDR_2_ASSOC.PRO July 5,2000 -kes ; converts Mariner 9 Vax XDR "sedr" files to Assoc files ; again: infile='' outfile='' & irec=0 & mor=0 read,'Supply input file name ',infile aa=strpos(infile,'.xdr') outfile=strmid(infile,0,aa)+'.udat' print,'output file is ',outfile openr, in_unit, /get_lun, infile , /xdr openw, out_unit, /get_lun, outfile, 91*4 new=assoc(out_unit,fltarr(91)) print, 'Starting conversion.' buffer = fltarr(91) while( not eof(in_unit) ) do begin readu, in_unit, buffer new(irec)= buffer irec=irec+1 endwhile close,in_unit,out_unit free_lun, in_unit free_lun, out_unit print, 'Conversion complete.' print, 'Number of records copied= ',irec read,'Want to process another? (y=1) ', mor if mor gt 0 then goto,again end