
     	SUBROUTINE RRWDBW
C
C  PROGRAMMER:  S.I. ZDZIESZYNSKI
C		ALFRED UNIVERSITY   JUN-7-1994
C
C	THIS ROUTINE READS FROM A RIETVELD/DBW RAW DATA FILE
C	AND STORES IN THE CORRESPONDING COMMON BLOCKS
C
     	INCLUDE 'FILECONV.CBS'
     	CHARACTER DAY*9, TIM*8
C
C  OPEN THE INPUT FORMATTED FILE ...
C
111	CLOSE( UNIT=IINP )
     	OPEN( UNIT=IINP, FILE=FILINP, STATUS='OLD', READONLY,
     	1 FORM='FORMATTED', CARRIAGECONTROL='LIST', ERR=888 )
C
C  READ THE FILE HEADER INFORMATION...
C
     	READ(IINP,1000,ERR=777,END=777) BANG(1),BANG(3),BANG(2),
     &                                ( SLID(I),I=1,14)
1000	FORMAT(3F8.2,14A4)
C
C  READ THE INTENSITY DATA...
C
        BANG(10)=1
     	NPTS = INT((BANG(2)-BANG(1))/BANG(3)+0.1) + 1
     	IF( NPTS.LT.1 ) GOTO 777
     	READ(IINP,1200,ERR=777,END=777) (YOBS(I),I=1, NPTS)
1200	FORMAT(8(F7.0,1X))
     	GOTO 999

777	IERR = 1
     	GOTO 999
888	IERR = 2
999	RETURN
     	END
