	program cntssc
C....................................................Dec 2015
C 
C
C Infile: /APKP/ssc.dat:
c
	CHARACTER(10) DD
      CHARACTER(10) TT
      CHARACTER(5) ZZ
	CHARACTER*65 infile,outfile,txt
C
	CALL DATE_AND_TIME(DATE=DD,TIME=TT,ZONE=ZZ)
      TT(5:)='      '
      WRITE(*,*) 'PC Date: Year,Month,Day = ',DD,'Time = ',TT
C

	infile='d:/apkp/ssc.dat' !
	outfile='cntssc.txt'  !
	OPEN(10,FILE=INFILE,action='READ')
	OPEN(11,FILE=OUTFILE)

	do i=1,6
	read(10,36) txt ! extra line
	enddo
   36 format(A65)
   37 format(I4,2(1X,I2),1X,I4)	 ! ssc

C start cycle on year: =====================================
	do 400 iyear=1932,2015	! 1932-2015
	icntyr=0
  401	read(10,37,end=38) kyear,kmn,kdy,kut
	if (kyear.eq.iyear) then
	icntyr=icntyr+1
	goto 401
	else
	backspace(10)
	goto 402
	endif
C
  402	write(*,33) iyear,icntyr
	write(11,33) iyear,icntyr

  400	CONTINUE ! next year

   38	close(unit=10)
C
  139	close(unit=11)
C
C
   33 format(1X,I4,1X,I4)
C
C
C	
	goto 900
    2 CONTINUE
           write(*,*) 'INPUT FILE IS NOT IN YOUR DIRECTORY '
  900 pause ' '
      STOP
      END

