CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
	SUBROUTINE DUMP_FILE_HEADER(UNIT, FILE_HEADER)
C+
C
C FUNCTIONAL DESCRIPTION:
C
C     This routine dumps the File header for a CD file in an appropriate
C     format. 
C
C FORMAL ARGUMENTS:
C
C     UNIT:
C	I*4	  I	The Fortran unit number to which the dumped information
C			will be written in Ascii form.
C
C     FILE_HEADER:
C	/FILE_HDR/  I	A record of structure type  /FILE_HDR/ containing the
C			information to be dumped.
C
C INTERFACE:
C
!	INTERFACE
!	  SUBROUTINE DUMP_FILE_HEADER(UNIT, FILE_HEADER)
!	    INTEGER, INTENT(IN) :: UNIT
!	    RECORD /FILE_HDR/ FILE_HEADER
!	    INTENT(IN) FILE_HEADER
!	  END SUBROUTINE DUMP_FILE_HEADER
!	END INTERFACE
C
C IMPLICIT INPUTS:
C
C     None
C
C IMPLICIT OUTPUTS:
C
C     None
C
C SIDE EFFECTS:
C
C     None
C
C COMMON BLOCKS:
C
C     None
C
C INCLUDE FILES:
C
C     EDBDEF.INC
C
C DESIGN:
C
C     Write out file header information, one entity per line.
C
C     Includes internal functions FORMAT_T_TIME and FORMAT_T_TIME_MD.  Each
C     of these takes as an input argument a record of structure type /T/
C     containing a time and returns a character string containing the time
C     in human readable format.
C
C This version:   1.4   19-FEB-1996
C
C CREATED:
C
C     12-OCT-1995    Lawrence Bleau
C
C DEVELOPMENT HISTORY:
C 
C  Author       Date		Description of Change 
C  --------	-----------	--------------------- 
C  L. BLEAU                     Created
C  J. PAQUETTE  12-OCT-1995     Added comments
C  J. PAQUETTE  26-OCT-1995     Changed format, adding month and day for times
C  J. PAQUETTE  22-JAN-1996     Changed format, removed various items
C  J. PAQUETTE  19-FEB-1996     Removed PROC_OPT from output
C  L. Bleau	 9-APR-1999	added comments
C  L. Bleau	 3-NOV-1999	added comments
C  L. Bleau	15-NOV-1999	added comments
C
C-
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CDEC$   IDENT	'1.4'
	INCLUDE 'INC_DIR:EDBDEF.INC'
	INTEGER UNIT
	RECORD /FILE_HDR/ FILE_HEADER
C
	CHARACTER FORMAT_T_TIME*29, FORMAT_T_TIME_MD*32
C
	WRITE(UNIT,1001) 
     &		FILE_HEADER.SC_ID,
     &   	FILE_HEADER.FIRST_EPOCH,
     &   	FORMAT_T_TIME(FILE_HEADER.FIRST_TIME), FORMAT_T_TIME_MD(FILE_HEADER.FIRST_TIME),
c     &   	FILE_HEADER.LAST_EPOCH,
     &   	FORMAT_T_TIME(FILE_HEADER.LAST_TIME), FORMAT_T_TIME_MD(FILE_HEADER.LAST_TIME),
     &   	FILE_HEADER.NUM_PACKETS,
c     &   	FILE_HEADER.PROC_OPT,
c     &   	FILE_HEADER.DATA_TYPE_FLAGS,
     &   	FILE_HEADER.RECEIPT_EPOCH,
     &   	FORMAT_T_TIME(FILE_HEADER.RECEIPT_TIME), FORMAT_T_TIME_MD(FILE_HEADER.RECEIPT_TIME)
c     &   	FILE_HEADER.SEL_OPT,
c     &   	FILE_HEADER.NUM_SEL_APID,
c     &   	FILE_HEADER.APID,
c     &   	FILE_HEADER.NUM_QAC,
c     &   	FILE_HEADER.QAC_OFFSET

1001	FORMAT(/' FILE HEADER:'/
     &		3X,'SC_ID',          T20,'= ',I14,/
     &   	3X,'FIRST_EPOCH',    T20,'= ',F14.3,/
     &   	3X,'FIRST_TIME',     T20,'= ',A,5X,A,/
c     &   	3X,'LAST_EPOCH',     T20,'= ',F14.3,/
     &   	3X,'LAST_TIME',      T20,'= ',A,5X,A,/
     &   	3X,'NUM_PACKETS',    T20,'= ',I14,/
c     &   	3X,'PROC_OPT',       T20,'= ',I14,/
c     &   	3X,'DATA_TYPE_FLAGS',T20,'= ',Z14,'(X)',/
     &   	3X,'RECEIPT_EPOCH',  T20,'= ',F14.3,/
     &   	3X,'RECEIPT_TIME',   T20,'= ',A,5X,A)
c     &   	3X,'SEL_OPT',        T20,'= ',Z14,'(X)',/
c     &   	3X,'NUM_SEL_APID',   T20,'= ',I14,/
c     &   	3X,'APID',           T20,'= ',Z14,'(X)',/
c     &   	3X,'NUM_QAC',        T20,'= ',I14,/
c     &   	3X,'QAC_OFFSET',     T20,'= ',I14
	RETURN
	END
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
	CHARACTER*29 FUNCTION FORMAT_T_TIME(TIM)
	INCLUDE 'INC_DIR:EDBDEF.INC'
	RECORD /T/ TIM
C
	CHARACTER*29 STR
C
	WRITE(STR,1001) TIM.YEAR, TIM.DOY, TIM.HR, TIM.MIN, TIM.SEC, TIM.MSEC, TIM.MICRO
1001	FORMAT(I5,I5,3I4,'.',2I3)
	FORMAT_T_TIME = STR
	RETURN
	END
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
	CHARACTER*32 FUNCTION FORMAT_T_TIME_MD(TIM)
	INCLUDE 'INC_DIR:EDBDEF.INC'
        INTEGER*4 MON,DAY
	RECORD /T/ TIM
C
	CHARACTER*32 STR
C
        CALL CNVRT_YRDY_TO_YRMNDY( TIM.YEAR, TIM.DOY, MON, DAY)
	WRITE(STR,1001) TIM.YEAR, MON, DAY, TIM.HR, TIM.MIN, TIM.SEC, TIM.MSEC, TIM.MICRO
1001	FORMAT(I5,5I4,'.',2I3)
	FORMAT_T_TIME_MD = STR
	RETURN
	END
