;file XDR_2_ASSOC.PRO June 9,2000 -kes ; converts Mariner 9 Vax XDR "mm" files to Assoc files ; again: infile='' outfile='' & irec=0 & mor=0 read,'Supply input file name ',infile aa=strpos(infile,'.xdr') if aa eq -1 then aa=strpos(infile,'.XDR') outfile=strmid(infile,0,aa)+'.dat' print,'output file is ',outfile print,' ' print,' ' read,' How many records to convert? ',nrec openr, in_unit, /get_lun, infile , /xdr openw, out_unit, /get_lun, outfile, 1265*2 new=assoc(out_unit,intarr(1265)) print, 'Starting conversion.' buffer = intarr(1265) for ijk=0,nrec-1 do begin readu, in_unit, buffer new(irec)= buffer irec=irec+1 end 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