	SUBROUTINE FMTHDR(HEADER)

C.begin.doc ************************** begin.doc
C  
C .c ;MODULE
C .c ;^&FMTHDR\&
C .nf
C .x FMTHDR>Defined
C Source:FMTHDR.FTN
C Designer           :DAVE LUECK
C Author             :DAVE LUECK
C Date of last update:17-MAR-87
C Revision level     :1.0
C  
C .C ;Formal Parameter List
C Receives:
C  
C    HEADER                     DATABASE HEADER ARRAY
C  
C Returns:
C  
C Accesses common(s):
C  
C .X RTRDBS>Common
C    RTRDBS                     RESIDENT COMMON ROUTING DATABASE
C  
C Accesses file(s):
C  
C Other modules referenced:
C .SK
C .fill
C .SK
C Description:
C .sk    
C	This subroutine formats and displays thr routing database 
C header.
C end.doc ****************************** end.doc  

	IMPLICIT COMPLEX (A-Z)

	PARAMETER	HDRSIZ = 20		! HEADER SIZE IN WORDS

	INTEGER*2	HEADER(HDRSIZ)		! DATABASE HEADER 
	CHARACTER*1	REPLY			! USER RESPONSE
	CHARACTER*6	YESNO			! 'YES'/'NO' LITERAL
	INTEGER*2	I			! INDEX
C
C	FORMAT OF DATABASE HEADER
C
C	HEADER(01-03) = LOCAL NODE NAME
C	HEADER(04)    = DATABASE ID
C	HEADER(05)    = DATABASE ACCESSED FLAG
C	HEADER(06)    = POINTER TO FIRST NRB
C	HEADER(07)    = LAST NRB SCANNED FOR OUTPUT
C	HEADER(08)    = NUMBER OF NRB'S ROUTED
C	HEADER(09)    = MSG ID NOT ROUTABLE TIMER FLAG (1=ACTIVE)
C	HEADER(10)    = CONNECT TIMER FLAG (1=ACTIVE)
C	HEADER(11)    = POINTER TO OUTPUT BUFFERS
C	HEADER(12)    = POINTER TO NEXT POSSIBLE AVAILABLE OUTPUT BUFFER
C	HEADER(13)    = TOTAL NUMBER OF OUTPUT BUFFERS
C	HEADER(14)    = NUMBER OF FREE OUTPUT BUFFERS
C	HEADER(15)    = SIZE OF OUTPUT BUFFER
C	HEADER(16)    = POINTER TO RESPONSE BUFFERS
C	HEADER(17)    = POINTER TO NEXT POSSIBLE AVAILABLE RESPONSE BUFFER
C	HEADER(18)    = TOTAL NUMBER OF RESPONSE BUFFERS
C	HEADER(19)    = NUMBER OF FREE RESPONSE BUFFERS
C	HEADER(20)    = SIZE OF RESPONSE BUFFER
C

	WRITE (5,1000) 
1000	FORMAT(///' Routing Database Header'/)

	WRITE (5,1100) (HEADER(I),I=1,3)
1100	FORMAT('    Local Node Name .............................. ',3A2)

	WRITE (5,1110) HEADER(4)
1110	FORMAT('    Database Id .................................. ',O6.6)

	IF (HEADER(5).EQ.0) THEN
		YESNO = '    NO'
	ELSE
		YESNO = '   YES'
	ENDIF
	WRITE (5,1120) YESNO
1120	FORMAT('    Database accessed by Router .................. ',A6)

	WRITE (5,1130) HEADER(6)
1130	FORMAT('    Address to first NRB ......................... ',O6.6)

	WRITE (5,1140) HEADER(7)
1140	FORMAT('    Address of last NRB scanned for output ....... ',O6.6)

	WRITE (5,1150) HEADER(8)
1150	FORMAT('    Number of NRB''s defined ...................... ',I6)

	IF (HEADER(9).EQ.0) THEN
		YESNO = '    NO'
	ELSE
		YESNO = '   YES'
	ENDIF
	WRITE (5,1160) YESNO
1160	FORMAT('    Message Id not routable timer active ......... ',A6)

	IF (HEADER(10).EQ.0) THEN
		YESNO = '    NO'
	ELSE
		YESNO = '   YES'
	ENDIF
	WRITE (5,1170) YESNO
1170	FORMAT('    Remote node connect timer active ............. ',A6)

	WRITE (5,1180) HEADER(11)
1180	FORMAT('    Address of first output buffer ............... ',O6.6)

	WRITE (5,1190) HEADER(12)
1190	FORMAT('    Address of next available output buffer ...... ',O6.6)

	WRITE (5,1200) HEADER(13)
1200	FORMAT('    Number of output buffers ..................... ',I6)

	WRITE (5,1210) HEADER(14)
1210	FORMAT('    Number of free output buffers ................ ',I6)

	WRITE (5,1220) HEADER(15)
1220	FORMAT('    Size of output buffer (decimal bytes) ........ ',I6)

	WRITE (5,1230) HEADER(16)
1230	FORMAT('    Address of first response buffer ............. ',O6.6)

	WRITE (5,1240) HEADER(17)
1240	FORMAT('    Address of next available response buffer .... ',O6.6)

	WRITE (5,1250) HEADER(18)
1250	FORMAT('    Number of response buffers ................... ',I6)

	WRITE (5,1260) HEADER(19)
1260	FORMAT('    Number of free response buffers .............. ',I6)

	WRITE (5,1270) HEADER(20)
1270	FORMAT('    Size of response buffer (decimal bytes) ...... ',I6)

	RETURN
	END
