User Tools

Site Tools


cdc:nos2.source:nam5871:csstno

CSSTNO

Table Of Contents

  • [00007] PROC CSSTNO
  • [00008] TERMINATE NPU OPERATOR.
  • [00011] TERMINATE NPU OPERATOR.
  • [00031] PROC SSBCBW
  • [00032] PROC SSBTBW
  • [00033] PROC SSTAQE

Source Code

CSSTNO.txt
  1. *DECK CSSTNO
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. USETEXT TXTSMCS
  6. USETEXT TXTSUSS
  7. PROC CSSTNO;
  8. # TITLE - TERMINATE NPU OPERATOR. #
  9. BEGIN
  10. #
  11. ** CSSTNO - TERMINATE NPU OPERATOR.
  12. *
  13. * D.K. ENDO 82/03/10
  14. *
  15. * THIS PROCEDURE DOES I-LAYER CLEAN-UP WHEN A CONNECT BROKEN/
  16. * INACTIVE IS DETECTED.
  17. *
  18. * PROC CSSTNO
  19. *
  20. * ENTRY 1. CON/CB, CON/CB WARNING, OR FC/INACT SM
  21. *
  22. * EXIT 2. NPUCB-S AND OCB-S ASSOCIATED WITH OPERATOR ON
  23. * CONNECTION ARE CLEARED.
  24. *
  25. #
  26. #
  27. **** PROC CSSTNO - XREF LIST BEGINS.
  28. #
  29. XREF
  30. BEGIN
  31. PROC SSBCBW; # CLEAR BIT IN WORD #
  32. PROC SSBTBW; # TEST BIT IN WORD #
  33. PROC SSTAQE; # ADD QUEUE ENTRY #
  34. END
  35. #
  36. ****
  37. #
  38.  
  39. ITEM I; # LOOP INDUCATION VARIABLE #
  40. ITEM SEND B; # SEND PENDING INDICATOR #
  41. ITEM RUNNING B; # ONLINE DIAGNOSTICS RUNNING FLAG #
  42. ITEM TNAME C(10); # TERMINAL NAME #
  43.  
  44. #
  45. * FLG$WORD - THIS BASED ARRAY POINTS TO THE SEND AND/OR STATUS
  46. * REQUEST PENDING BIT MAP.
  47. #
  48. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  49. BEGIN
  50. ITEM FW$WORD I(00,00,60);
  51. END
  52.  
  53. CONTROL EJECT;
  54. # #
  55. # CSSTNO CODE BEGINS HERE #
  56. # #
  57. #
  58. * IF THE OCB STATE IS SET AND IT IS NOT THE CASE THAT THIS SM IS
  59. * FC/INACT WITH THE NO TIME OUT FLAG SET, THEN PROCEED WITH
  60. * CLEAN UP OPERATIONS FOR THE CONNECTION.
  61. *
  62. #
  63. IF OC$STATE[ABHADR[0]] AND
  64. NOT (WCB$SMID[0] EQ SMID"FCINA" AND OC$NTO[ABHADR[0]])
  65. THEN
  66. BEGIN
  67. #
  68. * SEARCH THE NPUCB-S TO SEE IF THIS OPERATOR IS A CURRENT ON-LINE
  69. * DIAGNOSTICS OPERATOR. IF SO, THEN SEND AN OLD/TM TO TERMINATE
  70. * THE PROCESSING AND CLEAR THE CURRENT-OLD-OPERATOR.
  71. #
  72. FOR I=0 STEP 1 WHILE I LS CSNPCNT
  73. DO
  74. BEGIN
  75. P<FLG$WORD> = LOC(NPU$OVFLGS[I]);
  76. SSBTBW(FLG$WORD,ABHADR[0],RUNNING);
  77.  
  78. IF RUNNING
  79. THEN
  80. BEGIN
  81. WCB$WORD[1] = 0;
  82. WCB$SMID[1] = SMID"OLDTM";
  83. WCB$WC[1] = 2 + LOLDIN;
  84. ABHWORD[1] = 0;
  85. ABHABT[1] = APPSUP;
  86. ABHDN[1] = NPU$NID[I];
  87. ABHSN[1] = NPU$HID[I];
  88. ABHBT[1] = NETCMD;
  89. ABHACT[1] = CT8ASCII;
  90. ABHTLC[1] = NOLDIN;
  91. SPMWD[1] = 0;
  92. PFCSFC[1] = OLDTM;
  93. OLDDO[1] = ABHADR[0];
  94. SSBCBW(FLG$WORD,ABHADR[0]);
  95. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  96. END
  97. END
  98. #
  99. * SEARCH THE NPUCB-S AND FOR EACH NPU CONTROLLED BY THIS
  100. * OPERATOR, CLEAR THE CONTROLLING NOP FIELD, SEND AN EVENT
  101. * INDICATING LOSE OF CONTROL, AND IF THERE IS AN OPERATOR WITH
  102. * AUTO CONTROL STATUS, THEN GIVE THAT OPERATOR CONTROL.
  103. #
  104. IF CSACNOP EQ ABHADR[0]
  105. THEN
  106. BEGIN
  107. CSACNOP = 0;
  108. END
  109.  
  110. FOR I=0 STEP 1 WHILE I LS CSNPCNT
  111. DO
  112. BEGIN
  113. IF NPU$STAT[I] EQ SUPSTAT"SUP" AND
  114. NPU$CNOP[I] EQ ABHADR[0]
  115. THEN
  116. BEGIN
  117.  
  118. WCB$WORD[1] = 3;
  119. WCB$SMID[1] = SMID"CTRLOFF";
  120. ABHSN[1] = I;
  121. TNAME = OC$TNAM[NPU$CNOP[I]];
  122. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
  123.  
  124. NPU$CNOP[I] = 0;
  125.  
  126. IF CSACNOP NQ 0
  127. THEN
  128. BEGIN
  129. NPU$CNOP[I] = CSACNOP;
  130.  
  131. WCB$WORD[1] = 3;
  132. WCB$SMID[1] = SMID"CTRLON";
  133. ABHSN[1] = I;
  134. TNAME = OC$TNAM[CSACNOP];
  135. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
  136. END
  137. END
  138. END
  139. #
  140. * IF THE CURRENT COMMAND IS -STATUS-, THEN IF CURRENT COMMAND NPU1
  141. * IS NON-ZERO, CLEAN UP THINGS FOR NPU1, IF CURRENT COMMAND NPU2 IS
  142. * NON-ZERO, CLEAN UP THINGS FOR NPU2. CLEAR THE AFFECTED NPU COUNT
  143. * AND CURRENT COMMAND VERB. MAKE AN ENTRY IN THE EVENT QUEUE WITH
  144. * THE EVENT CODE SET TO -STATUS FINISHED-.
  145. #
  146. IF OC$VERB[ABHADR[0]] EQ "ST0"
  147. THEN
  148. BEGIN
  149. IF OC$CNPU[ABHADR[0]] NQ 0
  150. THEN
  151. BEGIN
  152. NPU$OPST[OC$CNPU[ABHADR[0]]] = MAXACN$ + 1;
  153. OC$CNPU[ABHADR[0]] = 0;
  154. END
  155.  
  156. P<FLG$WORD> = LOC(NPU$STFLGS[0]);
  157. FOR I=0 STEP 1 WHILE I LS CSNPCNT
  158. DO
  159. BEGIN
  160. SSBCBW(FLG$WORD[I],ABHADR[0]);
  161. END
  162.  
  163. OC$VERB[ABHADR[0]] = " ";
  164. OC$NCNT[ABHADR[0]] = 0;
  165. WCB$WORD[1] = 0;
  166. WCB$SMID[1] = SMID"STUFIN";
  167. WCB$WC[1] = 2;
  168. ABHWORD[1] = ABHWORD[0];
  169. ABHTLC[1] = 0;
  170. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
  171. END
  172. #
  173. * IF THE CURRENT COMMAND VERB IS -SE0-, THEN CLEAR THE CURRENT SEND
  174. * OPERATOR, CURRENT COMMAND NPU1, AND COMMAND VERB, AND SEND A NULL
  175. * TEXT TO THE TERMINAL WITH INPUT ALLOWED FLAG SET.
  176. #
  177. ELSE IF OC$VERB[ABHADR[0]] EQ "SE0"
  178. THEN
  179. BEGIN
  180. P<FLG$WORD> = LOC(NPU$SDFLGS[0]);
  181. FOR I=0 STEP 1 WHILE I LS CSNPCNT
  182. DO
  183. BEGIN
  184. SSBTBW(FLG$WORD[I],ABHADR[0],SEND);
  185.  
  186. IF SEND
  187. THEN
  188. BEGIN
  189. SSBCBW(FLG$WORD[I],ABHADR[0]);
  190. NPU$OPSD[I] = MAXACN$ + 1;
  191. END
  192. END
  193.  
  194. OC$CNPU[ABHADR[0]] = 0;
  195. OC$NCNT[ABHADR[0]] = 0;
  196. OC$VERB[ABHADR[0]] = " ";
  197. WCB$WORD[1] = 0;
  198. WCB$SMID[1] = SMID"TTEXT";
  199. WCB$IAF[1] = TRUE;
  200. WCB$WC[1] = 2;
  201. ABHWORD[1] = 0;
  202. ABHADR[1] = ABHADR[0];
  203. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
  204. END
  205. #
  206. * IF THIS SM IS A CON/CB WARNING, THEN SET THE CB PENDING FLAG IN
  207. * THE OCB FOR THIS OPERATOR, OTHERWISE PUT A CON/END/R SM IN THE
  208. * PROTOCOL RESPONSE QUEUE. CLEAR THE OCB.
  209. #
  210. IF WCB$SMID[0] EQ SMID"CONCBW"
  211. THEN
  212. BEGIN
  213. OC$CBPD[ABHADR[0]] = TRUE;
  214. END
  215. ELSE
  216. BEGIN
  217. WCB$WORD[1] = 0;
  218. WCB$SMID[1] = SMID"CONENDR";
  219. WCB$WC[1] = 2;
  220. ABHWORD[1] = 0;
  221. ABHADR[1] = ABHADR[0];
  222. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
  223.  
  224. OC$WORD[ABHADR[0]] = 0;
  225. OC$ORD[ABHADR[0]] = ABHADR[0];
  226. I = OC$TYPE[ABHADR[0]];
  227. OC$WORD1[ABHADR[0]] = 0;
  228. OC$TYPE[ABHADR[0]] = I;
  229. OC$WORD2[ABHADR[0]] = 0;
  230. END
  231. END
  232.  
  233.  
  234. RETURN; # **** RETURN **** #
  235.  
  236. END # CSSTNO #
  237. TERM
cdc/nos2.source/nam5871/csstno.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator