c#reformat.f     srs     v1.0     apr 81
c
c	program to read a coordinate file in 
c	one format and output in another.
c
c	the available formats are listed by
c	the program and are documented in 
c	subroutine FTCHUZ.
c
c	Subroutines called:
c	FTCHUZ
c	RDHEAD
c	WTHEAD
c	RDREC
c	WTREC
c	WTTAIL
c	ENCODE
c	RECODE
c
c&************************************************
c
	dimension x(3),d(2)
        character*20 dir
	character*4 an,rn,code,ext 
	character*28 filena
c
	lun1 = 1
	lun2 = 2
	icount = 0
c
	rewind lun1
	call ftchuz(in)
	call rdhead(lun1,in)
	rewind lun2
	call ftchuz(iout)
	call wthead(lun2,iout)
c
10	call rdrec(lun1,in,iend,an,rn,nr,x,d)
	if (iend .eq. 1) go to 50
	icount = icount + 1
	call wtrec(lun2,iout,icount,an,rn,nr,x,d)
	go to 10
c
50	call wttail(lun2,iout)
	print *,icount,' Records translated.'
	stop
	end
