C.begin.doc ************************** begin.doc
C
C
C .C ;Module name: 
C .C ;^&PRTSTA\&
C .NF 	
C .x PRTSTA>Defined
C Source:PRTSTA0.MOD
C Designer           :H.Barta
C Author             :
C Date of last update:22-APR-85
C Revision level     :1.0
C 	
C .C ;Formal Parameter List
C Receives:
C 
C   SUCCESS          LOGICAL*1  Indicates whether or not this program is exiting
C                               after a normal completion.
C 
C   LUN              INTEGER*2  Logical Unit assigned to the 
C                               uotput device for the report.
C     
C Returns:
C 	
C Accesses common(s):
C 	
C .X SUCK1>Common
C         SUCK1                 Common contains statistics regarding what was or
C                               was not found during the scan. The variablea are:
C                                    
C .X SUCK2>Common
C         SUCK2                 Common contains statistics regarding what was or
C                               was not found during the scan. The variablea are:
C                                    
C                                         MODDIR(1000)   CHAR*100 (1-80 File name
C                                                              81-100 Module name)
C                                         MODCNT        Number of doc's found.
C                                         
C                                         NFOUND(1000)   CHAR*80 File names that
C                                                               had no doc's.
C                                         NFDCNT        number of entries found in
C                                                       NFOUND.
C 	
C 	
C Accesses file(s):
C 	
C Other modules referenced:
C .SK
C .fill
C .SK
C Description:
C .sk    
C PRTSTA simply outputs the statistics accumulated in common SUCKER to the
C indicated LUN.
C.end.doc ****************************** end.doc
C
C  
	SUBROUTINE 	PRTSTA
C
C
c------------------------------------------------------------------------
c             common sucker
	CHARACTER*100	MODDIR(1000)	!modules and filenames found
	CHARACTER*80	NFOUND(1000)	!files where no document was found
c
	INTEGER*2	MODCNT,		!number of entries in MODCNT
	1		NFDCNT		!number of entries in NFOUND
C
	COMMON / SUCK1 / MODDIR, NFOUND
	COMMON / SUCK2 / MODCNT, NFDCNT
C
C-------------------------------------------------------------------------
C
C
C WRITE OUT RESULTS FROM THIS RUN
C
	OPEN(UNIT= 4, NAME='EXTRACT.LST',STATUS='NEW',
	1	DISPOSE='PRINT')
C
C  PRINT OUT JOB STATISTICS
C 	
	WRITE( 4, 110 )
 110	FORMAT(  '                       RESULTS FROM EXTRACT RUN'/
	1	 '                       ------------------------')
c
C
	IF( MODCNT.GT.0 ) THEN
	  WRITE( 4, 120 ) MODCNT
 120	  FORMAT( 20X, I5, ' MODULE DEFINITIONS FOUND' // 
	1	1X,' FILE NAME',69X,'MODULES FOUND ' /
	2	1X,'-----------',69X,'-------------' )
C
	  DO 10 J=1, MODCNT
 	  	WRITE( 4, 130 ), MODDIR(J)
10	 CONTINUE
 130	  FORMAT( 1X, A100 )
C
	ELSE
	  WRITE( 4, 140 )
 140	  FORMAT(// '  NO MODULE DEFINITIONS WERE FOUND IN FILES ',
	1	'SUCCESSFULLY SCANNED' )
	ENDIF
C
C
	IF(NFDCNT.GT.0) THEN
	  WRITE( 4, 200 ) NFDCNT
 200	  FORMAT(///10X,I5,' FILES SCANNED WITH NO DEFINITION(S) FOUND'//) 
C
	  DO 20 J=1, NFDCNT
 20	  WRITE( 4, 230 ) NFOUND(J)
 230	  FORMAT( 20X, A80 )
C
	ELSE
	  WRITE( 4, 210 )
 210	FORMAT(// ' ALL MODULES SUCCESSFULLY SCANNED CONTAINED ',
	1	'DEFINITIONS' )
	ENDIF
C
	RETURN
	END
