User Tools

Site Tools


cdc:nos2.source:nam5871:np_sprt

NP$SPRT

Table Of Contents

  • [00005] PROC NP$SPRT
  • [00054] PROC NP$SN
  • [00055] PROC NP$MSG
  • [00056] PROC NP$PIOE
  • [00057] PROC NP$TIM
  • [00058] PROC NP$WRTR
  • [00059] PROC NP$WRTW
  • [00060] FUNC NP$XCDD C(10)

Source Code

NP$SPRT.txt
  1. *DECK NP$SPRT
  2. *IF,DEF,STAT
  3. USETEXT NP$STAT
  4. *ENDIF
  5. PROC NP$SPRT;
  6. *IF,DEF,IMS
  7. #
  8. *1DC NP$SPRT
  9. * 1. PROC NAME AUTHOR DATE
  10. * NP$SPRT E. GEE 86/01/27
  11. *
  12. * 2. FUNCTIONAL DESCRIPTION
  13. * DUMPS STATISTICS TO ZZZZZSN AND THEN CLOSES ZZZZZSN.
  14. *
  15. * 3. METHOD USED
  16. * NP$SPRT CALCULATES THE USED CPU TIME. IT WRITES HEADERS TO
  17. * ZZZZZSN AND CALLS NP$SN TO PRINT OUT THE STAT ARRAY.
  18. *
  19. * 4. ENTRY CONDITONS
  20. * NP$SPRT MAY BE CALLED FROM NETSTC OR NETOFF.
  21. * SN$WRAT = ERROR CODE IF I/O ERROR HAS OCCURRED ON ZZZZZSN FILE
  22. *
  23. * 5. EXIT CONDITIONS
  24. * PRNT - MUST BE FALSE
  25. * SN$WRAT - ABNORMAL TERMINATION CODE FROM I/O ERROR ON ZZZZZSN
  26. *
  27. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  28. * NP$CRT CONTROL DATA COPYRIGHT DECK
  29. * NP$STAT AIP STATISTICS TABLE
  30. *
  31. * 7. PROCEDURES CALLED
  32. * NP$MSG ISSUE DAYFILE MESSAGE
  33. * NP$PIOE PROCESS I/O ERROR ON STATISTICS FILE
  34. * NP$SN CONVERT AIP STAT FROM INTEGER TO DECIMAL
  35. * DISPLAY AND WRITE TO STATISTICS FILE
  36. * NP$TIM GET SYSTEM TIME
  37. * NP$WRTR WRITE END OF RECORD TO FILE
  38. * NP$WRTW WRITE WORDS TO CIO BUFFER FROM WSA
  39. * NP$XCDD CONVERT TO DECIMAL DISPLAY
  40. *
  41. * 8. DAYFILE/DIAGNOSTIC MESSAGES
  42. * NONE.
  43. *
  44.  #
  45. *ENDIF
  46. BEGIN
  47. *CALL NP$CRT
  48. *IF,DEF,STAT
  49. # #
  50. # ROUTINE CALLED #
  51. # #
  52. XREF
  53. BEGIN
  54. PROC NP$SN; # OUTPUTS LINE TO ZZZZZSN #
  55. PROC NP$MSG; # ISSUE DAYFILE MESSAGE #
  56. PROC NP$PIOE; # PROCESS I/O ERROR ON DISK FILE#
  57. PROC NP$TIM; # GETS ACCUMULATED CPU TIME #
  58. PROC NP$WRTR; # WRITES AN EOR TO OUTPUT FILE #
  59. PROC NP$WRTW; # WRITES A LINE TO OUTPUT FILE #
  60. FUNC NP$XCDD C(10); # CONVERT INT TO DEC DISPLAY #
  61. END
  62. # #
  63. # LOCAL VARIABLES #
  64. # #
  65. ITEM
  66. CHARWD C(10),
  67. I I, # TEMPORARY INDEX #
  68. SPRTAT B; # TRUE IF NP$SPRT DETECT I/O ERR#
  69.  
  70. ARRAY HEADING P(6);
  71. ITEM
  72. HDNG$CC C(0,0,10)=["0 "],
  73. HDNG$FMT1 C(1,0,16)=["CPU TIME USED: "],
  74. CPU$TIME C(2,36,10),
  75. HDNG$FMT2 C(3,36,1)=["."],
  76. CPU$TIMA C(3,42,3),
  77. HDNG$FMT3 C(4,0,4)=[" SEC"],
  78. HDNG$FMT4 I(5,0,60)=[0];
  79.  
  80. ARRAY HEADINGA P(7);
  81. ITEM
  82. HDNG$CCA C(0,0,10)=["0 "],
  83. HDNG$FMT1A C(1,0,10)=["NUMBER OF "],
  84. HDNG$MSG C(2,0,40),
  85. HDNG$FMT2A I(6,0,60)=[0];
  86.  
  87. ARRAY STATMSG [0:7] P(5);
  88. ITEM
  89. STATMSGT U(0,0,60)=[TYPE"GDM",
  90. TYPE"GMM",
  91. TYPE"GSM",
  92. TYPE"GMD",
  93. TYPE"GSD",
  94. TYPE"GMWD",
  95. TYPE"GSWD",
  96. TYPE"GMR"],
  97. STATMSGS C(1,0,40)=["DISCARDED UPLINE MESSAGES",
  98. "GET DATA MSG WORKLIST TRANSFERS",
  99. "GET SUP MSG WORKLIST TRANSFERS",
  100. "DATA MSGS TRANSFERRED TO AIP DATA QUEUE",
  101. "SUP MSGS TRANSFERRED TO AIP SM QUEUE",
  102. "DATA WDS TRANSFERRED TO AIP DATA QUEUE",
  103. "SUP MSG WDS TRANSFERRED TO AIP SM QUEUE",
  104. "TIMES AIP DATA QUEUE RESET"];
  105.  
  106.  
  107. CONTROL EJECT;
  108.  
  109. #**********************************************************************#
  110. # #
  111. # NP$SPRT EXECUTION BEGINS HERE #
  112. # #
  113. SPRTAT = FALSE; # INIT I/O ERR DETECTED FLAG #
  114. NP$TIM(ST$TIM[1]); # GET ACCUMULATED CPU TIME #
  115. IF CPMLSECS[0] GR CPMLSECS[1]
  116. THEN
  117. BEGIN
  118. CPMLSECS[1] = CPMLSECS[1] + 1000;
  119. CPSECS[1] = CPSECS[1] - 1;
  120. END
  121. CHARWD = NP$XCDD(CPSECS[1] - CPSECS[0]);
  122. CPU$TIME = CHARWD;
  123. CHARWD = NP$XCDD(CPMLSECS[1] - CPMLSECS[0]);
  124. CPU$TIMA = C<7,3> CHARWD;
  125. IF C<0,1>CPU$TIMA EQ " " # ZERO LEADING BLANKS #
  126. THEN
  127. C<0,1>CPU$TIMA = "0";
  128. IF C<1,1>CPU$TIMA EQ " "
  129. THEN
  130. C<1,1>CPU$TIMA = "0";
  131. NP$WRTW(SN$FET,HEADING,6); # WRITE CPU TIME ENTRY TO CIO BF#
  132. HDNG$MSG = "PROCEDURE CALLS";
  133. NP$WRTW(SN$FET,HEADINGA,7);
  134. PRNT = TRUE;
  135. FOR I = TYPE"CHEK" STEP 1 UNTIL TYPE"WAIT"
  136. DO
  137. BEGIN
  138. NP$SN(I);
  139. END
  140. HDNG$MSG = "WORKLIST TRANSFER ATTEMPTS";
  141. NP$WRTW(SN$FET,HEADINGA,7);
  142. NP$SN(TYPE"WLX");
  143. NP$SN(TYPE"WLNX");
  144. HDNG$MSG = "INPUT/OUTPUT BLOCKS TRANSFERRED";
  145. NP$WRTW(SN$FET,HEADINGA,7);
  146. FOR I = TYPE"INB" STEP 1 UNTIL TYPE"OSB4"
  147. DO
  148. BEGIN
  149. NP$SN(I);
  150. END
  151. FOR I = 0 STEP 1 UNTIL 7
  152. DO
  153. BEGIN
  154. IF STAT[STATMSGT[I]] NQ 0
  155. THEN # STATISTICS DATA EXISTS #
  156. BEGIN
  157. HDNG$MSG = STATMSGS[I]; # TEXT OF STATISTICS TYPE #
  158. NP$WRTW(SN$FET,HEADINGA,7);
  159. NP$SN(STATMSGT[I]); # OUTPUT STATISTICS DATA #
  160. END
  161. END
  162. IF (STAT[TYPE"ERRS"] NQ 0) OR
  163. (STAT[TYPE"NAKS"] NQ 0)
  164. THEN
  165. BEGIN
  166. HDNG$MSG = "ERRORS";
  167. NP$WRTW(SN$FET,HEADINGA,7);
  168. NP$SN(TYPE"ERRS");
  169. NP$SN(TYPE"NAKS");
  170. END
  171. PRNT = FALSE;
  172. NP$WRTR(SN$FET,1);
  173. IF SN$AT[0] NQ 0
  174. THEN # WRITE ERROR OCCURRED ON FILE #
  175. BEGIN
  176. NP$PIOE(SN$FET); # PROCESS I/O ERROR ON FILE #
  177. END
  178.  
  179. *ENDIF
  180. RETURN;
  181. END #NP$SPRNT#
  182. TERM
cdc/nos2.source/nam5871/np_sprt.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator