User Tools

Site Tools


cdc:nos2.source:nam5871:ns_hsm

NS$HSM

Table Of Contents

  • [00010] PROC NS$HSM(ERRCODE)
  • [00012] NS$HSM - HOST SM PROCESSOR.
  • [00016] HOST SM PROCESSOR.
  • [00044] PROC NS$DBG
  • [00050] PROC NDLOVLD
  • [00051] FUNC NS$FEC U
  • [00052] PROC NS$MSG
  • [00053] PROC NS$SHD
  • [00054] PROC NS$TKD
  • [00055] PROC NETOFF

Source Code

NS$HSM.txt
  1. *DECK NS$HSM
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT ERR$NS
  5. USETEXT HOC$NS
  6. USETEXT LIN$NS
  7. USETEXT PCM$NS
  8. USETEXT PFC$NS
  9. USETEXT SMB$NS
  10. PROC NS$HSM(ERRCODE); # HOST SUPERVISORY MESSAGE PROCESSOR #
  11.  
  12. # TITLE NS$HSM - HOST SM PROCESSOR. #
  13.  
  14. BEGIN # NS$HSM #
  15. #
  16. ** NS$HSM - HOST SM PROCESSOR.
  17. *
  18. * J.C. LEE 1981
  19. *
  20. * THIS ROUTINE PROCESS HOST SMS.
  21. *
  22. * PROC NS$HSM(ERRCODE)
  23. *
  24. * ENTRY:
  25. * NONE.
  26. *
  27. * EXIT:
  28. * ERRCODE = ILLEGAL PFC/SFC IF ONE IS DETECTED.
  29. *
  30. * METHOD:
  31. * VALIDATE ABH(ABT/ACT/ADR/TLC)
  32. * IDENTIFY HOST SM.
  33. * IF A VALID HOST SM, CALL APPROPRIATE ROUTINE TO PROCESS
  34. * THE SM.
  35. * ELSE, FLAG ERROR AND EXIT.
  36. *
  37. #
  38.  
  39. ITEM ERRCODE U; # ERROR CODE #
  40.  
  41. $BEGIN
  42. XREF
  43. BEGIN
  44. PROC NS$DBG; # TRACE PROC CALL #
  45. END
  46. $END
  47.  
  48. XREF
  49. BEGIN
  50. PROC NDLOVLD; # OVERLAY LOADER #
  51. FUNC NS$FEC U; # FORMAT ERROR CODE #
  52. PROC NS$MSG; # MESSAGE DISPATCHER #
  53. PROC NS$SHD; # SHUTDOWN NS #
  54. PROC NS$TKD; # TRANSFER DATA TO K DISPLAY BUFFER #
  55. PROC NETOFF; # DISCONNECT FROM NETWORK #
  56. END
  57.  
  58. DEF ENDHSM # 15 #; # LARGEST HSM VALUE #
  59.  
  60. ITEM INDEX U; # LOOP COUNTER #
  61. ITEM REASON U; # HOP COMMAND ERROR REASON CODE #
  62.  
  63. ARRAY HPFCSFC [0:ENDHSM] S(1); # TABLE OF PFC/SFC CODES FOR #
  64. BEGIN # LEGAL NETWORK SUPERVISORY MSGS#
  65. ITEM HSM$PFCSFC U(00,00,16) = [ # VALID HOST SM PFC/SFC #
  66. HOPPAGE,
  67. HOPCMD,
  68. HOPBRK,
  69. HOPSTRT,
  70. HOPENDD,
  71. HOPIG,
  72. HOPDU,
  73. HOPNOTR,
  74. HOPREL,
  75. HOPRS,
  76. HOPTRCE,
  77. HOPDB,
  78. HOPDE,
  79. ERRLGL,
  80. SHUINS,
  81. 0
  82. ];
  83. ITEM HSM$PCMDI U(00,42,18) = [ # PROGRAM COMMAND ORDINAL #
  84. 0,
  85. 0,
  86. 0,
  87. 0,
  88. 0,
  89. 0,
  90. PCMDI"DU",
  91. PCMDI"NOTR",
  92. PCMDI"REL",
  93. PCMDI"RS",
  94. PCMDI"TRCE",
  95. PCMDI"DB",
  96. PCMDI"DE",
  97. 0,
  98. 0,
  99. 0,
  100. ];
  101. END
  102.  
  103. DEF L$RSHDMSG # 4 #; # MESSAGE SIZE #
  104. DEF DM$RSHDMSG # DM$LOCAL #; # MESSAGE ROUTING OPTIONS #
  105. ARRAY MSG$RSHD [0:1] S(L$RSHDMSG);
  106. BEGIN # SHUTDOWN REQUESTED MESSAGE #
  107. ITEM RSHD$TEXT C(00,00,35) = [
  108. "GRADUAL SHUTDOWN REQUESTED.",
  109. "IMMEDIATE SHUTDOWN REQUESTED.",
  110. ];
  111. ITEM RSHD$END U(03,30,30) = [2(0)];
  112. END
  113.  
  114. DEF L$READY # 2 #; # SIZE OF READY .. LINE #
  115. ARRAY READY[0:0]S(L$READY);
  116. BEGIN # READY .. LINE #
  117. ITEM RDY$LNHDR U(00,00,60); # LINE HEADER WORD #
  118. ITEM RDY$LNID U(00,00,24) = [LIN$IDENT]; # LINE ID #
  119. ITEM RDY$F$RSP B(00,41,01) = [TRUE]; # END OF COMMAND RESPONSE#
  120. ITEM RDY$LNSIZE U(00,42,18) = [L$READY]; # LINE SIZE #
  121. ITEM RDY$TEXT C(01,00,07) = ["READY.."]; # LINE TEXT #
  122. ITEM RDY$TERM U(01,42,18) = [0]; # LINE TERMINATOR #
  123. END
  124.  
  125. ARRAY BRK$OVLY [0:0] S(1);
  126. BEGIN # HOP/BRK PROCESSOR OVERLAY NAME/LEVEL #
  127. ITEM HBRK$NAM C(00,00,07) = ["BRKOVLY"];
  128. ITEM HBRK$LV1 U(00,42,09) = [2];
  129. ITEM HBRK$LV2 U(00,51,09) = [1];
  130. END
  131. ARRAY END$OVLY [0:0] S(1);
  132. BEGIN # HOP/END PROCESSOR OVERLAY NAME/LEVEL #
  133. ITEM HEND$NAM C(00,00,07) = ["ENDOVLY"];
  134. ITEM HEND$LV1 U(00,42,09) = [2];
  135. ITEM HEND$LV2 U(00,51,09) = [2];
  136. END
  137. ARRAY HCP$OVLY [0:0] S(1);
  138. BEGIN # HOP/CMD PREPROCESSOR OVERLAY NAME/LEVEL #
  139. ITEM HHCP$NAM C(00,00,07) = ["HCPOVLY"];
  140. ITEM HHCP$LV1 U(00,42,09) = [2];
  141. ITEM HHCP$LV2 U(00,51,09) = [3];
  142. END
  143. ARRAY HFI$OVLY [0:0] S(1);
  144. BEGIN # FILE COMMAND PROCESSOR OVERLAY #
  145. ITEM HHFI$NAM C(00,00,07) = ["HFIOVLY"];
  146. ITEM HHFI$LV1 U(00,42,09) = [2];
  147. ITEM HHFI$LV2 U(00,51,09) = [4];
  148. END
  149. ARRAY HHI$OVLY [0:0] S(1);
  150. BEGIN # HISTORY COMMAND PROCESSOR OVERLAY #
  151. ITEM HHHI$NAM C(00,00,07) = ["HHIOVLY"];
  152. ITEM HHHI$LV1 U(00,42,09) = [2];
  153. ITEM HHHI$LV2 U(00,51,09) = [5];
  154. END
  155. ARRAY HNO$OVLY [0:0] S(1);
  156. BEGIN # NOFILE COMMAND PROCESSOR OVERLAY #
  157. ITEM HHNO$NAM C(00,00,07) = ["HNOOVLY"];
  158. ITEM HHNO$LV1 U(00,42,09) = [2];
  159. ITEM HHNO$LV2 U(00,51,09) = [6];
  160. END
  161. ARRAY HST$OVLY [0:0] S(1);
  162. BEGIN # STATUS COMMAND PROCESSOR OVERLAY #
  163. ITEM HHST$NAM C(00,00,07) = ["HSTOVLY"];
  164. ITEM HHST$LV1 U(00,42,09) = [2];
  165. ITEM HHST$LV2 U(00,51,09) = [7];
  166. END
  167. ARRAY KDD$OVLY [0:0] S(1);
  168. BEGIN # K DISPLAY DIAGNOSTIC OVERLAY NAME/LEVEL #
  169. ITEM HKDD$NAM C(00,00,07) = ["KDDOVLY"];
  170. ITEM HKDD$LV1 U(00,42,09) = [2];
  171. ITEM HKDD$LV2 U(00,51,09) = [8];
  172. END
  173. ARRAY PAG$OVLY [0:0] S(1);
  174. BEGIN # HOP/PAGE PROCESSOR OVERLAY NAME/LEVEL #
  175. ITEM HPAG$NAM C(00,00,07) = ["PAGOVLY"];
  176. ITEM HPAG$LV1 U(00,42,09) = [2];
  177. ITEM HPAG$LV2 U(00,51,09) = [9];
  178. END
  179. ARRAY PCM$OVLY [0:0] S(1);
  180. BEGIN # PROGRAM COMMAND PROCESSOR OVERLAY #
  181. ITEM HPCM$NAM C(00,00,07) = ["PCMOVLY"];
  182. ITEM HPCM$LV1 U(00,42,09) = [2];
  183. ITEM HPCM$LV2 U(00,51,09) = [10];
  184. END
  185. ARRAY STR$OVLY [0:0] S(1);
  186. BEGIN # HOP/START PROCESSOR OVERLAY NAME/LEVEL #
  187. ITEM HSTR$NAM C(00,00,07) = ["STROVLY"];
  188. ITEM HSTR$LV1 U(00,42,09) = [2];
  189. ITEM HSTR$LV2 U(00,51,09) = [11];
  190. END
  191.  
  192. SWITCH HSMSWITCH # HOST SM PFC/SFC SWITCH #
  193. HSM$PAGE,
  194. HSM$CMD,
  195. HSM$BRK,
  196. HSM$STRT,
  197. HSM$ENDD,
  198. HSM$IG,
  199. HSM$PCMD,
  200. HSM$PCMD,
  201. HSM$PCMD,
  202. HSM$PCMD,
  203. HSM$PCMD,
  204. HSM$PCMD,
  205. HSM$PCMD,
  206. HSM$ERRLGL,
  207. HSM$SHUINS,
  208. HSM$ERR,
  209. ;
  210. SWITCH HOPCMDCASE:HCT # SWITCH FOR VALID HOP COMMANDS #
  211. LB$STATUS:CMD$STATUS,
  212. LB$HISTORY:CMD$HIST,
  213. LB$FILE:CMD$FILE,
  214. LB$NOFILE:CMD$NOFILE;
  215.  
  216. CONTROL EJECT;
  217. # VALIDATE ABH #
  218. $BEGIN
  219. NS$DBG("HSM"); # TRACE CALL #
  220. $END
  221.  
  222. REASON = 0;
  223. ERRCODE = 0;
  224. IF ABHABT[0] EQ APPCMD # ABT=3 #
  225. AND ABHADR[0] EQ 0 # CONNECTION 0 SM #
  226. AND ABHACT[0] EQ CT60TRANS # ACT = TRANSPARENT GO #
  227. AND ABHTLC[0] LQ MAX$SMSIZE # TLC IS WITHIN LIMIT #
  228. THEN # VALID ABH #
  229. BEGIN # IDENTIFY SUPERVISORY MESSAGE #
  230. HSM$PFCSFC[ENDHSM] = PFCSFC[0]; # GURANTEE PFC/SFC MATCH #
  231.  
  232. FOR INDEX=0 WHILE HSM$PFCSFC[INDEX] NQ PFCSFC[0]
  233. DO
  234. BEGIN
  235. INDEX = INDEX + 1;
  236. END
  237.  
  238. GOTO HSMSWITCH[INDEX]; # SWITCH ON PFC/SFC #
  239.  
  240. HSM$STRT:
  241. NDLOVLD(STR$OVLY,ERRCODE); # PROCESS HOP/START #
  242. IF ERRCODE EQ 0
  243. THEN # NO NAM ERROR DETECTED #
  244. BEGIN # SEND OUT DEFAULT HISTORY DISPLAY #
  245. CMD$WORD[PAR$CMD] = 0; # CLEAR COMMAND VERB #
  246. CMD$WORD[PAR$ALL] = 0; # FAKE HISTORY COMMAND #
  247. GOTO LB$HISTORY;
  248. END
  249.  
  250. ELSE
  251. GOTO HSMEXIT;
  252.  
  253. HSM$CMD: # PROCESS HOP/CMD/SM #
  254. P<SMB> = LOC(HOPMSG[0]); # FWA OF HOP COMMAND TEXT #
  255. NDLOVLD(HCP$OVLY,SMB,HOPDTL[0],ERRCODE,REASON);
  256. # PREPROCESS HOP COMMAND TEXT #
  257. IF ERRCODE EQ 0
  258. THEN # NO NAM ERROR ENCOUNTERED #
  259. BEGIN
  260. IF REASON EQ 0
  261. THEN # NO HOP COMMAND ERRROR DETECTED SO FAR #
  262. GOTO HOPCMDCASE[CMD$ORD[0]]; # CASE ON HOP COMMAND VERB #
  263.  
  264. ELSE # HOP COMMAND ERROR #
  265. GOTO CMDEXIT;
  266. END
  267.  
  268. ELSE # NAM ERROR OCCURRED #
  269. GOTO HSMEXIT;
  270.  
  271. LB$STATUS: # NPU STATUS DISPLAY COMMAND #
  272. NDLOVLD(HST$OVLY,REASON);
  273. GOTO CMDEXIT;
  274.  
  275. LB$HISTORY: # HISTORY DISPLAY COMMAND #
  276. NDLOVLD(HHI$OVLY);
  277. GOTO CMDEXIT;
  278.  
  279. LB$FILE: # ALTERNATE LOAD FILE COMMAND #
  280. NDLOVLD(HFI$OVLY,REASON);
  281. GOTO CMDEXIT;
  282.  
  283. LB$NOFILE: # CANCEL ALTERNATE LOAD FILE COMMAND #
  284. NDLOVLD(HNO$OVLY,REASON);
  285. GOTO CMDEXIT;
  286.  
  287. CMDEXIT:
  288. IF REASON NQ 0
  289. THEN # HOP COMMAND ERROR, ISSUE GIAGNOSTIC #
  290. NDLOVLD(KDD$OVLY,REASON);
  291.  
  292. SENDREADY: # SEND READY.. TO K DISPLAY #
  293.  
  294. NS$TKD(READY,L$READY,1);
  295.  
  296. GOTO HSMEXIT;
  297.  
  298. HSM$PAGE:
  299. NDLOVLD(PAG$OVLY,ERRCODE);
  300. GOTO HSMEXIT;
  301.  
  302. HSM$BRK:
  303. NDLOVLD(BRK$OVLY,ERRCODE);
  304. IF ERRCODE EQ 0
  305. THEN # NO NAM ERROR DETECTED #
  306. GOTO SENDREADY; # SEND READY .. TO K DISPLAY #
  307. ELSE # NAM ERROR DETECTED #
  308. GOTO HSMEXIT;
  309.  
  310. HSM$IG:
  311. DCW$F$IG[0] = TRUE; # DISABLE HOP ALERT MECHANISM #
  312. GOTO HSMEXIT;
  313.  
  314. HSM$ENDD:
  315. NDLOVLD(END$OVLY,ERRCODE);
  316. GOTO HSMEXIT;
  317.  
  318. HSM$PCMD:
  319. NDLOVLD(PCM$OVLY,HSM$PCMDI[INDEX]); # PROCESS PROGRAM COMMAND #
  320. GOTO HSMEXIT;
  321.  
  322. HSM$ERRLGL:
  323. ERRCODE = NS$FEC(EC"ERR$LGL",ERRRLG[0]); # SET LOGICAL ERROR #
  324. GOTO HSMEXIT;
  325.  
  326. HSM$SHUINS:
  327. IF SHUTF[0]
  328. THEN # FORCE SHUTDOWN REQUESTED #
  329. BEGIN
  330. INDEX = 1;
  331. FORCESHUT = TRUE;
  332. END
  333. ELSE # GRADUAL SHUTDOWN REQUESTED #
  334. BEGIN
  335. INDEX = 0;
  336. GRADSHUT = TRUE;
  337. END
  338. NS$MSG(MSG$RSHD[INDEX],L$RSHDMSG,DM$RSHDMSG);
  339. GOTO HSMEXIT;
  340.  
  341. HSM$ERR: # PROCES ERROR #
  342. ERRCODE = NS$FEC(EC"ERR$SM",SMEC"HSM$PFCSFC");
  343. GOTO HSMEXIT;
  344.  
  345. END
  346.  
  347. ELSE # NAM ERROR - ILLEGAL PFC/SFC #
  348. ERRCODE = NS$FEC(EC"ERR$SM",SMEC"HSM$ABH");
  349.  
  350. HSMEXIT:
  351.  
  352. RETURN;
  353. END # NS$HSM #
  354. TERM
cdc/nos2.source/nam5871/ns_hsm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator