      CHARACTER FILENAME*30,DUMMY*3
      CHARACTER OBJECT*14,EST*8,LST*8,SIDE*1,COMMENT*72,LIST*30
      INTEGER MO,DY,YR,RAH,RAM,RAS,DECD,DECM,DECS,HAH,HAM,HAS,FOCUS
      DOUBLE PRECISION JD
      WRITE (*,*) 'File with list of input files?'
      READ (*,5000) LIST
 5000 FORMAT (A30)
      OPEN (UNIT=1,FILE=LIST)
      OPEN (UNIT=2,FILE='DBASE74.TXT',STATUS='NEW')
    1 READ (1,1000,END=100) FILENAME
 1000 FORMAT (A30)
      OPEN (UNIT=3,FILE=FILENAME)
    5 READ (3,3005,END=20) DUMMY
      IF (DUMMY.NE.' --') GOTO 5
      READ (3,3006,END=20) JD,OBJECT,HAH,HAM,HAS,AIRMASS
      READ (3,3007,END=20) MO,DY,YR,RAH,RAM,RAS
      READ (3,3008,END=20) EST,DECD,DECM,DECS
      READ (3,3009,END=20) LST,SIDE
      READ (3,3010,END=20) FOCUS,T1C,T1A,T2A,T00
      READ (3,3011,END=20) COMMENT
 3005 FORMAT (A3)
 3006 FORMAT (5X,F13.0,6X,A14,5X,3I3,8X,F7.0)
 3007 FORMAT (6X,I2,1X,I2,3X,I2,8X,3I3)
 3008 FORMAT (6X,A8,10X,3I3)
 3009 FORMAT (6X,A8,30X,A1)
 3010 FORMAT (6X,I4,14X,F5.0,14X,F5.0,12X,F5.0,10X,F4.0)
 3011 FORMAT (8X,A72)
      HOURANG=3.1415926*(HAH+HAM/60.+HAS/3600.)/12.
      IF (MO.LT.10) THEN
      WRITE (2,2011) OBJECT,RAH,RAM,RAS,DECD,DECM,DECS,LST,HOURANG
     W ,SIDE,JD,DY,MO,YR,EST,FOCUS,AIRMASS,T1C,T1A,T2A,T00,COMMENT
      ELSE
      WRITE (2,2010) OBJECT,RAH,RAM,RAS,DECD,DECM,DECS,LST,HOURANG
     W ,SIDE,JD,DY,MO,YR,EST,FOCUS,AIRMASS,T1C,T1A,T2A,T00,COMMENT
      ENDIF
 2010 FORMAT (1X,A14,I4,':',I2,':',I2,I4,':',I2,':',I2,2X,A8,
     F  F10.5,1X,A1,F13.4,I4,'-',I2,'-',I2,2X,A8,I8,2X,
     F  F8.4,2X,4F5.1,A72)
 2011 FORMAT (1X,A14,I4,':',I2,':',I2,I4,':',I2,':',I2,2X,A8,
     F  F10.5,1X,A1,F13.4,I4,'-0',I1,'-',I2,2X,A8,I8,2X,
     F  F8.4,2X,4F5.1,A72)
      GOTO 5
   20 CLOSE (3)
      GOTO 1
  100 CLOSE (2)
      CLOSE (1)
      STOP
      END
