User Tools

Site Tools


cdc:nos2.source:nam5871:ns_hst

NS$HST

Table Of Contents

  • [00008] PROC NS$HST(REASON)
  • [00010] NS$HST - STATUS DISPLAY COMMAND PROCESSOR.
  • [00014] STATUS DISPLAY COMMAND PROCESSOR.
  • [00045] PROC NS$DBG
  • [00051] FUNC EDATE C(10)
  • [00052] FUNC ETIME C(10)
  • [00053] PROC MOVEOK
  • [00054] FUNC NS$CHD C(10)
  • [00055] PROC NS$TKD
  • [00056] PROC TSBINFO
  • [00057] FUNC XCDD C(10)

Source Code

NS$HST.txt
  1. *DECK NS$HST
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT HOC$NS
  5. USETEXT LIN$NS
  6. USETEXT NPT$NS
  7. USETEXT NST$NS
  8. PROC NS$HST(REASON); # STATUS DISPLAY COMMAND PROCESSOR #
  9.  
  10. # TITLE NS$HST - STATUS DISPLAY COMMAND PROCESSOR. #
  11.  
  12. BEGIN # NS$HST #
  13. #
  14. ** NS$HST - STATUS DISPLAY COMMAND PROCESSOR.
  15. *
  16. * J.C. LEE 1981
  17. *
  18. * THIS ROUTINE IS THE STATUS DISPLAY COMMAND PROCESSOR.
  19. *
  20. * PROC NS$HST(REASON)
  21. *
  22. * ENTRY:
  23. * STATUS COMMAND IN COMMON BLOCK IN TEXT *HOC$NS*.
  24. *
  25. * EXIT:
  26. * REASON - HOP COMMAND ERROR REASON CODE.
  27. * POSSIBLE ERROR IS:
  28. * - NPU NOT FOUND/NOT CONFIGURED.
  29. *
  30. * METHOD:
  31. * IF COMMAND IS "STATUS,NPUS"
  32. * PROCESSES ALL NPUS IN THE NPU TABLE(NPT).
  33. * ELSE (STATUS,NPU=NPUNAME)
  34. * SEARCH NPU TABLE FOR SPECIFIED NPU, IF NOT FOUND,
  35. * FLAG ERRCODE AND EXIT.
  36. * IF FOUND, FORMAT STATUS LINES AND SEND THEM TO * KDB* .
  37. *
  38. #
  39.  
  40. ITEM REASON U; # HOP COMMAND ERROR REASON CODE #
  41.  
  42. $BEGIN
  43. XREF
  44. BEGIN
  45. PROC NS$DBG; # TRACE CALL #
  46. END
  47. $END
  48.  
  49. XREF
  50. BEGIN
  51. FUNC EDATE C(10); # CONVERT TO DISPLAY CODED DATE #
  52. FUNC ETIME C(10); # CONVERT TO DISPLAY CODED TIME #
  53. PROC MOVEOK; # ALLOW TSB TO MOVE #
  54. FUNC NS$CHD C(10); # CONVERT TO DISPLAY CODED HEX #
  55. PROC NS$TKD; # TRANSFER DISPLAY DATA TO KDB #
  56. PROC TSBINFO; # LOCATE TSB #
  57. FUNC XCDD C(10); # CONVERT INTEGER TO DECIMAL DISPLAY #
  58. END
  59.  
  60. DEF CHAR$COMMA # O"56" #; # COMMA #
  61. DEF ST$LC # 4 #; # STATUS DISPLAY LINE COUNT #
  62. DEF ST$LS # 8 #; # STATUS DISPLAY LINE SIZE #
  63. DEF ST$WC # ST$LC*ST$LS #; # STATUS DISPLAY WORD COUNT #
  64. DEF MAX$HDISCC # 60 #; # CHARACTERS ALLOWED FOR A HOP/DIS LINE #
  65.  
  66. ITEM I I; # LOOP VARIABLE #
  67. ITEM J I; # LOOP VARIABLE #
  68. ITEM NBRS U; # NEIGHBOR NODE NUMBER #
  69. ITEM NPTCOUNT U; # NPT ENTRY COUNT #
  70. ITEM NPTINDEX U; # NPT ENTRY INDEX #
  71. ITEM NPUNAME C(7); # NPU NAME #
  72. ITEM NSTTSBN U; # NST TSB NUMBER #
  73. ITEM TEMP C(10); # TEMPORARY CHARACTER ITEM #
  74. ITEM TEMP1 U; # TEMPORARY #
  75. ITEM TSBFWA U; # TSB FWA #
  76. ITEM TSBSIZE U; # TSB SIZE #
  77. ITEM DONE B; # LOOP EXIT VARIABLE #
  78. ITEM FOUND B; # SPECIFIED NPU FOUND INDICATOR #
  79.  
  80. ITEM ST$L1 C(60) = # STATUS DISPLAY LINE 1 #
  81. " NN= NBS= EC= ";
  82. ITEM ST$L2 C(14) = # STATUS DISPLAY LINE 2 #
  83. " LDS=0";
  84.  
  85. ARRAY STAT$DIS [1:ST$LC]S(ST$LS);
  86. BEGIN # STATUS DISPLAY FORMAT #
  87. ITEM ST$LNHDR U(00,00,60); # LINE HEADER WORD #
  88. ITEM ST$LNID U(00,00,24) = [ST$LC(LIN$IDENT)]; # LINE ID #
  89. ITEM ST$LNSIZE U(00,42,18) = [ST$LC(ST$LS)]; # LINE SIZE #
  90. ITEM ST$LINE C(01,00,60); # DISPLAY LINE #
  91. ITEM ST$TERM U(07,00,60) = [ST$LC(0)]; # LINE TERMINATOR #
  92. #
  93.   STATUS DISPLAY LINE 1 FORMAT
  94. #
  95. ITEM ST$NPNAM C(01,00,07); # NPU NAME #
  96. ITEM ST$NID C(02,12,03); # NPU NODE NUMBER #
  97. ITEM ST$NNID C(03,12,23); # NEIGHBOR NODE NUMBER #
  98. ITEM ST$ECNT C(06,12,03); # PROTOCOL ERROR COUNT #
  99. #
  100.   STATUS DISPLAY LINE 2 FORMAT
  101. #
  102. ITEM ST$LDCNT C(02,18,04); # LOAD COUNT #
  103. ITEM ST$ALFPFN C(02,48,07); # ALTERNATE LOAD FILE PFN #
  104. ITEM ST$LT C(04,42,23); # LOAD DATE/TIME #
  105. ITEM ST$LDATE C(05,00,08); # MOST RECENT LOAD DATE #
  106. ITEM ST$LTIME C(06,12,08); # MOST RECENT LOAD TIME #
  107. #
  108.   STATUS DISPLAY LINE 3 FORMAT
  109. #
  110. ITEM ST$DUMPF C(01,54,06); # DUMP INDICATOR #
  111. ITEM ST$DFILE C(02,48,07); # NPU DUMP FILE NAME #
  112. ITEM ST$HALTC C(04,06,04); # NPU HALT CODE IN NPU DUMP #
  113. ITEM ST$DT C(04,42,23); # DUMP DATE/TIME #
  114. ITEM ST$DDATE C(05,00,08); # MOST RECENT DUMP DATE #
  115. ITEM ST$DTIME C(06,12,08); # MOST RECENT DUMP TIME #
  116. #
  117.   STATUS DISPLAY LINE 4 FORMAT
  118. #
  119. ITEM ST$ACTEVT C(01,00,60); # ACTIVITY EVENT MESSAGE #
  120. END
  121.  
  122. CONTROL EJECT;
  123.  
  124. $BEGIN
  125. NS$DBG("HST"); # TRACE CALL #
  126. $END
  127.  
  128. REASON = 0;
  129. NPUNAME = CMD$NPUNAM[PAR$NPU]; # NPU NAME SPECIFIED #
  130. IF NPUNAME NQ 0
  131. OR CMD$WORD[PAR$NPUS] NQ 0
  132. THEN
  133. BEGIN # ST,NPU=NPUNAME, OR ST,NPUS #
  134. NPTCOUNT = NPT$EC[0]; # NPU TABLE (NPT) ENTRY COUNT #
  135. NPTINDEX = 1; # PRESET INDEX TO FIRST ENTRY #
  136. IF NPUNAME NQ 0
  137. THEN
  138. BEGIN # ST,NPU=NPUNAME #
  139. FOUND = FALSE;
  140. FOR I = 1 STEP 1 WHILE I LQ NPTCOUNT
  141. AND NOT FOUND
  142. DO
  143. BEGIN # SEARCH NPT FOR SPECIFIED NPU #
  144. IF NPT$NPNAME[I] EQ NPUNAME
  145. THEN
  146. BEGIN
  147. NPTINDEX = I; # FOUND, SET INDEX #
  148. FOUND = TRUE;
  149. END
  150. END
  151. IF NOT FOUND
  152. THEN
  153. BEGIN # SPECIFIED NPU NOT FOUND #
  154. REASON = HOPCMDERR"NPUNCNFG";
  155. GOTO EXIT;
  156. END
  157. END
  158. DONE = FALSE;
  159. FOR I = NPTINDEX STEP 1 WHILE I LQ NPTCOUNT
  160. AND NOT DONE
  161. DO
  162. BEGIN # PROCESS ENTRY(IES) IN NPT #
  163. ST$LINE[1] = ST$L1; # INITIALIZE LINE 1 DISPLAY #
  164. ST$LINE[2] = ST$L2; # INITIALIZE LINE 2 DISPLAY #
  165. ST$LINE[3] = " "; # INITIALIZE LINE 3 DISPLAY #
  166. ST$LINE[4] = " "; # INITIALIZE LINE 4 DISPLAY #
  167.  
  168. ST$NPNAM[1] = NPT$NPNAME[I];
  169. TEMP = XCDD(NPT$NN[I]);
  170. ST$NID[1] = C<7,3>TEMP;
  171. TEMP = XCDD(NPT$PECNT[I]);
  172. ST$ECNT[1] = C<7,3>TEMP;
  173. IF NPT$ALFWD[I] NQ 0
  174. THEN # ALTERNATE LOAD FILE IN USE #
  175. ST$ALFPFN[2] = NPT$ALFPFN[I]; # DISPLAY ALT NLF #
  176.  
  177. NBRS = NPT$NBRS[I];
  178. FOR J=0 STEP 1 WHILE J LS 6
  179. AND NBRS NQ 0
  180. DO # LIST NEIGHBOR NODE NUMBERS #
  181. BEGIN
  182. TEMP1 = B<52,8>NBRS; # NEIGHBOR NODE NUMBER #
  183. IF J NQ 0
  184. THEN
  185. C<J*4-1,1>ST$NNID[1] = CHAR$COMMA;
  186.  
  187. TEMP = XCDD(TEMP1);
  188. C<J*4,3>ST$NNID[1] = C<7,3>TEMP;
  189. NBRS = NBRS / LSHIFT8;
  190. END # END J LOOP #
  191.  
  192. IF NPT$F$LTDF[I]
  193. THEN # NPU DUMP BEFORE A LOAD TAKES PLACE #
  194. ST$DUMPF[3] = "DUMP";
  195. ELSE # NO NPU DUMP BEFORE A LOAD #
  196. ST$DUMPF[3] = "NODUMP";
  197.  
  198. NSTTSBN = NPT$NSTTSB[I]; # TSB NUMBER OF NST #
  199. IF NSTTSBN NQ 0
  200. THEN # NST EXISTS #
  201. BEGIN
  202. TSBINFO(TSBSIZE,TSBFWA,NSTTSBN); # LOCATE NST #
  203. P<NST> = TSBFWA;
  204. TEMP = XCDD(NST$LC[0]);
  205. ST$LDCNT[2] = C<6,4>TEMP; # NPU LOAD COUNT #
  206.  
  207. IF NST$LDATE[0] NQ 0
  208. THEN
  209. BEGIN
  210. ST$LT[2] = "LD= LT= "; # INITIALIZE #
  211. TEMP = EDATE(NST$LDATE[0]);
  212. ST$LDATE[2] = C<1,8>TEMP; # SET LAST LOAD DATE #
  213. TEMP = ETIME(NST$LTIME[0]);
  214. ST$LTIME[2] = C<1,8>TEMP; # SET LAST LOAD TIME #
  215. END
  216.  
  217. IF NST$NDFPFN[0] NQ 0
  218. THEN # NPU DUMP FILE EXISTS #
  219. BEGIN
  220. ST$DFILE[3] = NST$NDFPFN[0]; # SET NPU DUMP FILE PFN #
  221. TEMP = NS$CHD(NST$NHC[0]);
  222. ST$HALTC[3] = C<0,4>TEMP; # SET NPU HALT CODE #
  223. ST$DT[3] = "DD= DT= "; # INITIALIZE #
  224. TEMP = EDATE(NST$DDATE[0]);
  225. ST$DDATE[3] = C<1,8>TEMP; # SET LAST NPU DUMP DATE #
  226. TEMP = ETIME(NST$DTIME[0]);
  227. ST$DTIME[3] = C<1,8>TEMP; # SET LAST NPU DUMP TIME #
  228. END
  229.  
  230. ST$ACTEVT[4] = NST$EVMTXT[0]; # SET EVENT MESSAGE TEXT #
  231. FOR J=0 STEP 1 WHILE J LS MAX$HDISCC
  232. AND TEMP1 NQ 0
  233. DO # SCAN FOR END OF EVENT MESSAGE TEXT #
  234. TEMP1 = C<J,1>ST$ACTEVT[4]; # CURRENT CHARACTER IN TEXT #
  235.  
  236. IF J NQ MAX$HDISCC
  237. THEN # MAX TEXT LENGTH NOT YET REACHED #
  238. C<J-1,MAX$HDISCC-J>ST$ACTEVT[4] = " "; # BLANK-FILLED #
  239. MOVEOK(NSTTSBN); # ALLOW NST TO MOVE #
  240. END
  241.  
  242. DCW$F$STS[0] = TRUE; # SET STATUS DISPLAY ASSIGNED #
  243. NS$TKD(STAT$DIS,ST$WC,ST$LC); # SEND DISPLAY TO KDB #
  244. IF FOUND
  245. THEN # SINGLE NPU ONLY #
  246. DONE = TRUE;
  247. END
  248.  
  249. END
  250.  
  251. ELSE # NPU MUST BE SPECIFIED #
  252. REASON = HOPCMDERR"NPUNSPEC";
  253. EXIT:
  254. RETURN;
  255. END # NS$HST #
  256. TERM
cdc/nos2.source/nam5871/ns_hst.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator