c ** Convert Matthews' (Carter's) Tables data to Random-access Binary c ** Use this program to create the files for the program "matt_con" c to read. INPUT files are "matt_tab.are" and "matt_tab.dat" to c produce "matt_tab.aaa" and "matt_tab.ddd". character inname*12,outnam*12,more*1 10 write(*,'(a)') ' Enter name of INPUT file: ' read(*,'(a)') inname write(*,'(a)') ' Enter name of OUTPUT file: ' read(*,'(a)') outnam write(*,'(a,a)') ' Opening INPUT file ',inname open(2,file=inname,err=99) write(*,'(a,a)') ' Opening OUTPUT file ',outnam open(3,file=outnam,access='direct',form='unformatted', 1 recl=4,status='new') nrec = 1 1 read(2,'(4x,i4,i6)',end=99,err=99) mrec,nn c ** Read the formatted INPUT data if(mrec.ne.nrec) print*,' Data sequence error at ',nrec c ** Write the unformatted (binary) OUTPUT data write(3,rec=mrec) nn nrec = nrec + 1 go to 1 99 print*,' Done after ',nrec,' records.' write(*,'(a)') ' Do another file (y/n)? ' read(*,'(a)') more if (more .eq. 'y' .or. more .eq. 'Y') go to 10 print*,' Thank you.' end