User Tools

Site Tools


cdc:nos2.source:nam5871:np_sn

Table of Contents

NP$SN

Table Of Contents

  • [00006] PROC NP$SN1)
  • [00059] PROC NP$PIOE
  • [00060] PROC NP$WRTW
  • [00061] FUNC NP$XCDD C(10)

Source Code

NP$SN.txt
  1. *DECK NP$SN
  2. *IF,DEF,STAT
  3. USETEXT NP$MODE
  4. USETEXT NP$STAT
  5. *ENDIF
  6. PROC NP$SN((STNUM));
  7. *IF DEF,IMS
  8. #
  9. *1DC NP$SN
  10. *
  11. * 1. PROC NAME AUTHOR DATE
  12. * NP$SN S.KRULEVITCH 77/07/01
  13. *
  14. * 2. FUNCTIONAL DESCRIPTION
  15. * WRITES STATISTICS COUNT TO THE NAM STATISTICS FILE ZZZZZSN.
  16. *
  17. * 3. METHOD USED
  18. * EACH LINE OF THE LOG ENTRY IS FORMATTED AND WRITTEN TO FILE
  19. * ZZZZZSN USING MACREL FUNCTION AND PROCEDURE CALLS.
  20. *
  21. * 4. ENTRY CONDITIONS
  22. * STNUM - NUMBER TO IDENTIFY WHICH STATISTIC IS TO BE LOGGED
  23. * ON THE ZZZZZSN FILE. THE NUMBER GIVES THE POSITION
  24. * IN THE STATISTICS ARRAY.
  25. * SN$FET - FET FOR FILE ZZZZZSN
  26. * PRNT - TRUE IF STATISTICS COUNT IS TO BE WRITTEN TO ZZZZZSN.
  27. * FALSE IF STATISTICS COUNTER IS BEING INCREMENTED.
  28. *
  29. * 5. EXIT CONDITIONS
  30. * NONE
  31. *
  32. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  33. * NP$CRT NP$MODE NP$STAT
  34. *
  35. * 7. PROCEDURES/FUNCTIONS CALLED
  36. * NP$PIOE PROCESS I/O ERROR ON DISK FILE
  37. * NP$WRTW
  38. * NP$XCDD
  39. *
  40. * 8. DAYFILE MESSAGES
  41. * NONE
  42. *
  43.  #
  44. *ENDIF
  45. BEGIN
  46. *CALL NP$CRT
  47. # #
  48. # FORMAL PARAMETER #
  49. # #
  50. ITEM
  51. STNUM I; #IDENTIFIES STATISTIC TO BE #
  52. #UPDATED OR PRINTED #
  53. *IF DEF,STAT
  54. # #
  55. # ROUTINES CALLED #
  56. # #
  57. XREF
  58. BEGIN
  59. PROC NP$PIOE; # PROCESS I/O ERROR ON DISK FILE #
  60. PROC NP$WRTW;
  61. FUNC NP$XCDD C(10);
  62. END
  63. # #
  64. # LOCAL VARIABLES #
  65. # #
  66. DEF OVERFLOW #1000000#; #STATISTICS FIELD OVERFLOW #
  67. ITEM
  68. I I; #TEMPORARY VARIABLE #
  69. ARRAY TOOBIG P(4);
  70. ITEM
  71. TOOBIGCC C(0,0,10)=["0 "], #DOUBLE SPACE #
  72. TOOBIGMSG C(1,0,24)=["****COUNTER OVERFLOW****"],
  73. TOOBIGEOL I(4,0,60)=[0];
  74. ARRAY STATISTIC[0:STATSIZE] P(2);
  75. ITEM
  76. STATNAME C(0,0,20)=
  77. [" NETCHEK ",
  78. " NETDMB ",
  79. " NETFUNC ",
  80. " NETGET ",
  81. " NETGETF ",
  82. " NETGETL ",
  83. " NETGETQ ",
  84. " NETGTFL ",
  85. " NETGTLQ ",
  86. " NETLGS ",
  87. " NETLOG ",
  88. " NETPUT ",
  89. " NETPUTF ",
  90. " NETSETP ",
  91. " NETWAIT ",
  92. " NETXFR ",
  93. " NETXFRC ",
  94. " ",
  95. " ",
  96. " ",
  97. " ",
  98. " ",
  99. " ",
  100. " ",
  101. " ",
  102. " ",
  103. " ",
  104. " ",
  105. " ",
  106. " SUCCESSFUL ",
  107. " UNSUCCESSFUL ",
  108. " INPUT ABT=0 ",
  109. " INPUT ABT=1 ",
  110. " INPUT ABT=2 ",
  111. " INPUT ABT=3 ",
  112. " INPUT ABT=4 ",
  113. ,
  114. " INPUT ABT=6 ", # INPUT QBLK BLOCK TYPE #
  115. " INPUT ABT=7 ", # INPUT QMSG BLOCK TYPE #
  116. " OUTPUT ABT=1 ",
  117. " OUTPUT ABT=2 ",
  118. " OUTPUT ABT=3 ",
  119. " OUTPUT ABT=4 ",
  120. ,
  121. " OUTPUT ABT=6 ", # OUTPUT QBLK BLOCK TYPE #
  122. " OUTPUT ABT=7 ", # OUTPUT QMSG BLOCK TYPE #
  123. " LOGICAL ERRORS ",
  124. " NAK-S ",
  125. " "];
  126. ARRAY STLOG P(5);
  127. ITEM
  128. STLOG$CC C(0,0,10)=[" "],
  129. STLOGA C(1,0,20),
  130. STLOGB C(3,0,10),
  131. STLOG$EOL I(4,0,60)=[0];
  132. CONTROL EJECT;
  133. # #
  134. # NP$SN EXECUTION BEGINS HERE #
  135. # #
  136. # STEP 1: CHECK IF STATISTICS GATHERING IS ON. #
  137. IF ACCEPTED
  138. THEN
  139. BEGIN
  140. # STEP 2: INCREMENT COUNTER UNLESS NP$SN HAS BEEN CALLED FOR #
  141. # PRINTOUT ONLY #
  142. IF NOT PRNT AND STATON
  143. THEN
  144. STAT[STNUM] = STAT[STNUM] + 1;
  145. # STEP 3: WRITE OVERFLOW MESSAGE IF COUNTER GETS TOO LARGE #
  146. IF STAT[STNUM] GQ OVERFLOW
  147. THEN
  148. NP$WRTW(SN$FET,TOOBIG,4);
  149. # STEP 4: WRITE STATISTIC TO FILE ZZZZZSN. #
  150. IF (STAT[STNUM] GR 0 AND PRNT) OR STAT[STNUM] GQ OVERFLOW
  151. THEN
  152. BEGIN
  153. STLOGA = STATNAME[STNUM];
  154. STLOGB = NP$XCDD(STAT[STNUM]);
  155. NP$WRTW(SN$FET,STLOG,5);
  156. STAT[STNUM] = 0; #CLEAR COUNTER #
  157. END
  158. #
  159.   CHECK FOR I/O ERROR IN STATISTICS FILE
  160. #
  161. IF SN$AT[0] NQ 0
  162. THEN # I/O ERROR HAS OCCURRED ON FILE#
  163. BEGIN
  164. NP$PIOE(SN$FET); # PROCESS I/O ERROR #
  165. END
  166. END #STATON#
  167. *ENDIF
  168. RETURN;
  169. END #NP$SN#
  170. TERM
1)
STNUM
cdc/nos2.source/nam5871/np_sn.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator