User Tools

Site Tools


cdc:nos2.source:nam5871:csesvc

CSESVC

Table Of Contents

  • [00006] PROC CSESVC
  • [00007] SEND ARCHETYPE SVC STATUS
  • [00010] SEND ARCHETYPE SVC STATUS
  • [00030] PROC CSESLE
  • [00031] PROC SSBSBF
  • [00032] FUNC SSDCAD U
  • [00033] PROC SSTAQE
  • [00034] FUNC XCDD C(10)

Source Code

CSESVC.txt
  1. *DECK CSESVC
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. USETEXT TXTSMCS
  6. PROC CSESVC;
  7. # TITLE - SEND ARCHETYPE SVC STATUS #
  8. BEGIN
  9. #
  10. ** CSESVC - SEND ARCHETYPE SVC STATUS
  11. *
  12. * A. L. TURKE 84/01/01
  13. *
  14. * THIS PROCEDURE FORMATS THE ARCHETYPE SVC STATUS TEXT
  15. * FROM THE INCOMING SM, AND SENDS IT OUT.
  16. *
  17. * PROC CSESVC
  18. *
  19. * ENTRY 1. STU/VC/U, OR STU/VC/N SM.
  20. *
  21. * EXIT 1. ENTRY IN CONNECTION QUEUE WITH STATUS TEXT.
  22. * 2. ENTRY IN OPERATOR QUEUE WITH STATUS TEXT.
  23. *
  24. #
  25. #
  26. **** PROC CSESVC - XREF LIST BEGINS.
  27. #
  28. XREF
  29. BEGIN
  30. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  31. PROC SSBSBF; # STORE BIT FIELD #
  32. FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY CODE CHAR #
  33. PROC SSTAQE; # ADD QUEUE ENTRY #
  34. FUNC XCDD C(10); # CONVERT DECIMAL INTEGER TO DISPLAY #
  35. END
  36. #
  37. ****
  38. #
  39. DEF SVC$TXTL # 50 #; # CHAR COUNT OF STATUS MESSAGE TEXT #
  40. DEF UNA$TXTL # 50 #; # CHAR COUNT OF SVC UNACTIONED CMD TEXT #
  41. DEF UNC$TXTL # 40 #; # CHAR COUNT OF UNACTIONED CMD TEXT #
  42.  
  43.  
  44. ITEM CNST1; # CONSTANT ---> 1 #
  45. ITEM CNST2; # CONSTANT ---> 2 #
  46. ITEM CNST3; # CONSTANT ---> 3 #
  47. ITEM I; # LOOP INDUCTION VARIABLE #
  48. #
  49.   THIS ARRAY DEFINES THE BUFFER WHERE THE NAME OF THE CURRENT
  50.   DEVICE IS SAVED.
  51. #
  52. ARRAY CRNT$SVC [00:00] S(1);
  53. BEGIN
  54. ITEM CRNT$VCN C(00,30,05);
  55. END
  56. #
  57.   THIS ARRAY IS USED AS A TEMPORARY STORAGE AREA FOR CHARACTER
  58.   STRINGS TO BE PLACED IN THE TEXT CURRENTLY BEING BUILT
  59. #
  60. ARRAY CTEMP$WORD [00:00] S(1);
  61. BEGIN
  62. ITEM CTEMP C(00,00,10);
  63. ITEM UTEMP U(00,30,30);
  64. ITEM CTEMP1 C(00,54,01);
  65. ITEM CTEMP2 C(00,48,02);
  66. ITEM CTEMP3 C(00,42,03);
  67. ITEM CTEMP5 C(00,30,05);
  68. END
  69. #
  70.   THIS TABLE CONTAINS THE POSSIBLE SUBTIP TYPES THAT THE
  71.   NUMERIC VALUE WILL MAP INTO.
  72. #
  73. DEF MX$STIP # 7 #;
  74. ARRAY STIP$TBL [00:MX$STIP] S(1);
  75. BEGIN
  76. ITEM STIP$VAL C(00,00,05) = ["UNDEF",
  77. "PAD ",
  78. "ITML ",
  79. "APPL ",
  80. "1CDC ",
  81. "2CDC ",
  82. "1USR ",
  83. "2USR "
  84. ];
  85. END
  86. #
  87.   THIS ARRAY DEFINES THE TEXT OF THE ARCHETYPE SVC STATUS
  88.   MESSAGE FORMATTED BY THIS PROC.
  89. #
  90. ARRAY SVC$TXT [00:04] S(1);
  91. BEGIN
  92. ITEM SVC$TIM C(00,00,10);
  93. ITEM SVC$SVC C(01,00,05) = ["SVC: "];
  94. ITEM SVC$VCN C(01,30,05);
  95. ITEM SVC$EN C(02,00,04) = [",EN="];
  96. ITEM SVC$ENN C(02,24,03);
  97. ITEM SVC$DI C(02,42,04) = [",DI="];
  98. ITEM SVC$DIN C(03,06,03);
  99. ITEM SVC$AC C(03,24,04) = [",AC="];
  100. ITEM SVC$ACN C(03,48,03);
  101. ITEM SVC$COM C(04,06,02) = [", "];
  102. ITEM SVC$STIP C(04,18,05);
  103. ITEM SVC$ZBYT U(04,48,12) = [ 0 ];
  104. END
  105. #
  106.   THIS ARRAY DEFINES THE -SVC UNACTIONED COMMAND- MESSAGE
  107.   TEXT THAT IS SENT OUT WHEN A STU/VC/U HAS A REASON CODE
  108.   OF TEM(DUE AN ARCHETYPE SVC NOT CONFIGURED).
  109. #
  110. ARRAY UNA$TXT [00:00] S(5);
  111. BEGIN
  112. ITEM UNA$TIM C(00,00,10) = [" "];
  113. ITEM UNA$SVC C(01,00,05) = ["SVC: "];
  114. ITEM UNA$VCN C(01,30,05);
  115. ITEM UNA$MSG C(02,00,20) = [", UNACTIONED COMMAND"];
  116. ITEM UNA$ZBYT U(04,00,60) = [ 0 ];
  117. END
  118. #
  119.   THIS ARRAY DEFINES THE -UNACTIONED COMMAND- MESSAGE TEXT
  120.   THAT IS SENT WHEN A STU/VC/U HAS A REASON CODE OF NINE
  121.   (AN EXPLANATORY ARCHETYE SVC STATUS LINE FOLLOWS).
  122. #
  123. ARRAY UNC$TXT [00:00] S(4);
  124. BEGIN
  125. ITEM UNC$TIM C(00,00,10) = [" "];
  126. ITEM UNC$MSG C(01,00,19) = [" UNACTIONED COMMAND"];
  127. ITEM UNC$ZBYT1 U(02,54,06) = [ 0 ];
  128. ITEM UNC$ZBYT2 U(03,00,60) = [ 0 ];
  129. END
  130. CONTROL EJECT;
  131. # #
  132. # CSESVC CODE BEGINS HERE #
  133. # #
  134. #
  135. * BEGIN CONSTRUCTING THE LINE IMAGE FOR THE ARCHETYPE SVC
  136. * STATUS. CONVERT THE ASCII ARCHETYPE SVC NAME TO DISPLAY
  137. * CODE AND PLACE IT IN THE TEXT. CONVERT THE ES(NO. OF ENABLED
  138. * SVCS), DS(NO. OF DISABLED SVCS), AS(NO. OF ACTIVE SVCS), AND
  139. * STIP FIELDS TO DISPLAY CODE AND INSERT THEM INTO THE TEXT.
  140. #
  141.  
  142.  
  143. ABHWORD[1] = 0; # INITIALIZE ABH #
  144. FOR I = 0 STEP 1 UNTIL 4
  145. DO
  146. BEGIN
  147. B<I*6,6>UTEMP[0] = SSDCAD(B<I*8,8>STUAN[0]);
  148. END
  149. SVC$VCN[0] = CTEMP5[0]; # STORE ARCHETYPE SVC NAME #
  150. CRNT$VCN[0] = CTEMP5[0]; # SAVE ARCHETYPE SVC NAME TEMPORARILY #
  151. CTEMP[0] = XCDD(1000 + STUES[0]); # CAUSES LEADING ZEROES #
  152. SVC$ENN[0] = CTEMP3[0]; # STORE NO. OF ENABLED SVCS #
  153.  
  154. CTEMP[0] = XCDD(1000 + STUDS[0]); # CAUSES LEADING ZEROES #
  155. SVC$DIN[0] = CTEMP3[0]; # STORE NO. OF DISABLED SVCS #
  156.  
  157. CTEMP [0] = XCDD(1000 + STUAS[0]); # CAUSES LEADING ZEROES #
  158. CNST1 = 3; # WORD ORDINAL OF BITFIELD #
  159. CNST2 = 48; # STARTING BIT POSITION #
  160. CNST3 = 18; # NO. OF BITS TO STORE #
  161. SSBSBF(SVC$TXT,CNST1,CNST2,CNST3,CTEMP$WORD); # STORE BITFIELD #
  162.  
  163. SVC$STIP[0] = STIP$VAL[STUSTP[0]]; # STORE SUBTIP TYPE #
  164.  
  165.  
  166. #
  167. * IF THIS SM IS STU/VC/U, GET THE CURRENT TIME AND APPEND IT
  168. * TO THE BEGINNING OF THE STATUS TEXT. IF THE REASON CODE
  169. * INDICATES NOT CONFIGURED, THEN SEND THE -SVC UNACTIONED
  170. * COMMAND- TEXT TO THE OPERATOR REPONSE QUEUE WITH AN
  171. * AUDIENCE GROUP OF ONE. IF THE REASON CODE INDICATES CCP
  172. * COULD NOT ENABLE/DISABLE ARCHETYPE SVCS, THEN SEND THE
  173. * -UNACTIONED COMMMAND- TEXT FOLLOWED BY AN EXPLANATORY
  174. * ARCHETYPE SVC STATUS LINE.
  175. #
  176. IF WCB$SMID[0] EQ SMID"STUVC"
  177. THEN
  178. BEGIN
  179. WCB$WORD[1] = 0;
  180. ABHADR[1] = AUDGR3$;
  181. FOR I = 0 STEP 1 WHILE NPU$NID[I] NQ ABHSN[0] AND
  182. I LS CSNPCNT
  183. DO
  184. BEGIN
  185. END
  186. ABHABN[1] = I;
  187.  
  188. IF STURCV[0] EQ RRCV"SNC" # REASON CODE = 10 #
  189. THEN
  190. BEGIN
  191. UNA$TIM[0] = CTM$CLOCK[0]; # STORE CURRENT TIME #
  192. UNA$VCN[0] = CRNT$VCN[0]; # STORE ARCHETYPE SVC NAME #
  193. WCB$WC[1] = 2 + (UNA$TXTL / 10); # WORD LENGTH OF TEXT #
  194. ABHTLC[1] = UNA$TXTL; # WORD LENGTH OF TEXT #
  195. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],UNA$TXT[0]);
  196. CSESLE(ABHSN[0],WCBUF[1],UNA$TXT);
  197. END
  198. ELSE
  199. BEGIN
  200. IF STURCV[0] EQ RRCV"NED" # REASON CODE = 9 #
  201. THEN
  202. BEGIN
  203. UNC$TIM[0] = CTM$CLOCK[0]; # STORE CURRENT TIME #
  204. WCB$WC[1] = 2 + (UNC$TXTL / 10); # WORD LENGTH OF TEXT #
  205. ABHTLC[1] = UNC$TXTL; # CHAR LENGTH OF TEXT #
  206. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],UNC$TXT[0]);
  207. CSESLE(ABHSN[0],WCBUF[1],UNC$TXT);
  208. SVC$TIM[0] = CTM$CLOCK[0]; # STORE CURRENT TIME #
  209. WCB$WC[1] = 2 + (SVC$TXTL / 10); # WORD LENGTH OF TEXT #
  210. ABHTLC[1] = SVC$TXTL; # TEXT CHAR LENGTH #
  211. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],SVC$TXT[0]);
  212. CSESLE(ABHSN[0],WCBUF[1],SVC$TXT);
  213. END
  214. ELSE # STU/VC/U NO REASON CODE #
  215. BEGIN
  216. SVC$TIM[0] = CTM$CLOCK[0]; # STORE CURRENT TIME #
  217. WCB$WC[1] = 2 + (SVC$TXTL / 10); # WORD LENGTH OF TEXT #
  218. ABHTLC[1] = SVC$TXTL; # TEXT CHAR LENGTH #
  219. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],SVC$TXT[0]);
  220. CSESLE(ABHSN[0],WCBUF[1],SVC$TXT);
  221. END
  222. END
  223. END # STU/VC/U #
  224. #
  225. * IF THIS SM IS STU/VC/N, THEN SEND THE STATUS TEXT TO
  226. * THE OPERATOR IDENTIFIED BY THE ACN OF INCOMING SM
  227. #
  228. ELSE # ASSUME STU/VC/N #
  229. BEGIN
  230. WCB$WORD[1] = 0;
  231. WCB$WC[1] = 2 + (SVC$TXTL / 10) -1; # SUBTRACT TIME WORD #
  232. WCB$SMID[1] = SMID"TTEXT";
  233.  
  234. ABHADR[1] = ABHCN[0];
  235. ABHTLC[1] = SVC$TXTL - 10; # SUBTRACT WORD CONTAINING TIME #
  236.  
  237. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],SVC$TXT[1]);
  238. END
  239.  
  240.  
  241. RETURN; # **** RETURN **** #
  242. END # CSESVC #
  243. TERM
cdc/nos2.source/nam5871/csesvc.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator