C----------------------------------------------------------------------
	SUBROUTINE READJNS(dname,pname,filform,nfil,STATUS)
C----------------------------------------------------------------------
C Read in file in JONES format
C
C----------------------------------------------------------------------
	LOGICAL status
	INTEGER nfil
	character*(*) dname,pname,filform
	CHARACTER*5 thisform/'JONES'/

	include 'shared$common'
	include '[-.shared]flabel.common'
C
	INTEGER ln

	Character*80 card1,card2
	LOGICAL exist

C Assume that the read was not successful
	STATUS = .false.

C Is there a datafile name?
	IF (dname .eq. ' ') RETURN

C   First, Does the file exist?
	INQUIRE(FILE=dname,EXIST=exist,NAME=cfilnam(nfil),
	1	defaultfile='.JONES')
	IF (.not. exist) RETURN

	OPEN(UNIT=IN,FILE=cfilnam(nfil),TYPE='OLD',ERR=111,
	1	defaultfile='.JONES',FORM='FORMATTED',readonly,shared)

C  Read first two cards
	read (in,'(a)',err=111) card1,card2
	IF (card1(7:7) .ne. '.' .or. card1(17:17) .ne. '.' .or. 
	1	  card2(7:7) .ne. '.' .or. card2(17:17) .ne. '.') goto 111
	rewind(unit=IN)

C----------------------------------------------------------------------
C JONES format
	do i=1,M$PTS
	  read(IN,fmt='(2f10.3)',end=88) bx(i,nfil),b(i,nfil)
	  j = i	      
	ENDDO
88	npnt = j
	FINISH(nfil) = bx(j,nfil)
	DELTA(nfil) = (FINISH(nfil) - START(nfil))/(1.*npnt-1.)
	drm = DELTA(nfil)
	DO i=1,npnt
	  besd(i,nfil) = sqrt(B(i,nfil))
	ENDDO
	DO i=2,npnt
	  drm = max(drm,bx(i+1,nfil)-bx(i,nfil))
	ENDDO
	IF (abs(DELTA(nfil) - drm) .gt. 0.001) then
	  write (LO,'(A)') 
	1	' JONES FILE Warning -- angle spacing is not linear'
	  DELTA(nfil) = 0.0
	ENDIF
C the JONES format has no wavelength, so ask for one
	IRAD(nfil) = '  '
	CALL WAVEINQ(LO,LI,IRAD(nfil),WAVE(nfil),WKA1(nfil),WKA2(nfil),*33)
33	INST(nfil)='  '
	SOURCE(nfil)='  '
	MONO(nfil)= WKA1(nfil) .eq. WKA2(nfil)
	FXTYP(nfil) = 1
	FYTYP(nfil) = 1
	filform = thisform
	NPOINT(nfil)=npnt
	STATUS = .true.
	ln = lench(cfilnam(nfil))
	write (LO,'(A)') ' File '//cfilnam(nfil)(:ln)
	1		//' read in JONES format'
111	close(unit=IN)
	RETURN
	END

