      PROGRAM HEADER
C     THIS PROGRAM CHECKS THE RAW HEADER FILE
C                     22 AUGUST 1993
      INTEGER*2 NHED
      INTEGER*4 JATA(30)
      LOGICAL*1 KATA(120)
      DIMENSION DATHED(30)
      CHARACTER*30 INFILE
      DATA NHED/1/
      CALL GETCL(INFILE)
      OPEN(UNIT=NHED,FILE=INFILE,FORM='UNFORMATTED',STATUS='OLD',
     1 ACCESS='TRANSPARENT')
5     READ(UNIT=NHED,END=1000)KATA
      IGG=1
      DO 20 IG=1,30
      CALL SWAP4(KATA(IGG),JATA(IG))
20    IGG=IGG+4
      DO 21 I=1,30
21    DATHED(I)=FLOAT(JATA(I))
      DATHED(7)=.001*DATHED(7)
      DATHED(8)=.001*DATHED(8)
      DATHED(9)=.001*DATHED(9)
      WRITE(*,100)(JATA(I),I=1,6),(DATHED(J),J=7,9),(JATA(K),K=10,14)
100   FORMAT(' Vehicle ID    =    ',I9,20X,'Experiment ID =    ',I9,/,
     1 ' Orbit Number  =    ',I9,20X,'Julian Date   =    ',I9,/,
     2 ' Year          =    ',I9,20X,'Day of Year   =    ',I9,/,
     3 ' UT Start of Data = ',F9.2,20X,'UT End of Data =   ',F9.2,/,
     4 ' UT First Perigee = ',F9.2,20X,'VTCW at Start =     ',Z8,/,
     5 ' VTCW at End   =     ',Z8,20X,'Agency Tape Date = ',I9,/,
     6 ' Missing Maj Frames ',I9,20X,'Filled Minor Frms  ',I9,/)
      GO TO 1001
1000  PRINT*,'BAD FILE--'
1001  CLOSE(UNIT=NHED)
      END


      SUBROUTINE SWAP4(IN,IOUT)
      LOGICAL*1 IN(4),IOUT(4)
      IOUT(1)=IN(4)
      IOUT(2)=IN(3)
      IOUT(3)=IN(2)
      IOUT(4)=IN(1)
      RETURN
      ENTRY SWAP2
      IOUT(1)=IN(2)
      IOUT(2)=IN(1)
      RETURN
      END

