C	PROGRAM TO REPORT CONTENTS OF TTYLOG DATA FILE
C
	INTEGER*2 REPTIM(8),RUNTIM(40),SWATIM(40),WAITIM(40)
C	CONTENTS OF TTYLOG DAT FILE
C       FIRST RECORD = 8-WORD GTIM$ RETURN, (YR,MO,DA,HR,MIN,SEC,TIC,TPS)
C       FOLLOWED BY 40. WORD RUN-TIME COUNTER,
C       SECOND RECORD = 40. WORD SWAP TIME COUNTER, 40.WORD WAIT TIME COUNTER
C
	OPEN (UNIT=3,NAME='LB:[1,100]TTYLOG.DAT',ERR=1000,
	1 STATUS='OLD',ACCESS='SEQUENTIAL',FORM='UNFORMATTED',
	2 RECORDTYPE='VARIABLE')
C
C	INPUT REPORT TIME LIMITS
C
        WRITE (5,100)
  100	FORMAT ('$START DATE (MO,DA,YR) ')
	READ (5,110) IMO,IDA,IYR
  110	FORMAT(3I8)
	WRITE(5,120)
  120	FORMAT ('$END   DATE (MO,DA,YR) ')
	READ (5,110) JMO,JDA,JYR
C
C	START READING FILE
C
  130	READ (3,END=1000) (REPTIM(I),I=1,8),(RUNTIM(I),I=1,40)
	READ (3) (SWATIM(I),I=1,40),(WAITIM(I),I=1,40)
	IF (REPTIM(1).LT.IYR) GOTO 130
	IF (REPTIM(1).GT.JYR) GOTO 1000
	IF (REPTIM(2).LT.IMO) GOTO 130
	IF (REPTIM(2).GT.JMO) GOTO 1000
	IF (REPTIM(3).LT.IDA) GOTO 130
	IF (REPTIM(3).GT.JDA) GOTO 1000
C
C	FOUND ONE WANTED, REPORT IT
C
	WRITE(6,200)
  200	FORMAT(//,' TIME',T10,'TT#',T20,'RUN',T30,'SWAP',
	1 T40,'WAIT'/' -----',T10,'---',T20,'------',
	2 T30,'------',T40,'------',/)
	WRITE(6,210)REPTIM(4),REPTIM(5)
  210	FORMAT(' ',I2,':',I2)
	DO 300, I=1,40
	IF (RUNTIM(I)+SWATIM(I)+WAITIM(I).EQ.0) GOTO 300
	FRUN=FLOAT(RUNTIM(I))/10.
	FSWA=FLOAT(SWATIM(I))/10.
	FWAI=FLOAT(WAITIM(I))/10.
	WRITE(6,250) I,FRUN,FSWA,FWAI
  250	FORMAT(T10,O3,T20,F7.1,T30,F7.1,T40,F7.1)
  300	CONTINUE
	GOTO 130
 1000	CLOSE (3)
	CALL EXIT
	END
