User Tools

Site Tools


cdc:nos2.source:nam5871:csests

CSESTS

Table Of Contents

  • [00007] PROC CSESTS
  • [00008] SEND TERMINAL STATUS
  • [00011] SEND TERMINAL STATUS.
  • [00031] PROC CSESLE
  • [00032] PROC SSBSBF
  • [00033] FUNC SSDCAD U
  • [00034] PROC SSTAQE
  • [00035] FUNC XCDD C(10)
  • [00036] FUNC XCHD C(10)

Source Code

CSESTS.txt
  1. *DECK CSESTS
  2. USETEXT TEXTOV
  3. USETEXT TEXTCS
  4. USETEXT TEXTSS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSMCS
  7. PROC CSESTS;
  8. # TITLE - SEND TERMINAL STATUS #
  9. BEGIN
  10. #
  11. ** CSESTS - SEND TERMINAL STATUS.
  12. *
  13. * D.K. ENDO 82/03/16
  14. *
  15. * THIS PROCEDURE FORMATS THE TEXT REPORTING TERMINAL STATUS FROM THE
  16. * INCOMING SM, AND SEND IT OUT.
  17. *
  18. * PROC CSESTS
  19. *
  20. * ENTRY 1. STU/TE/U, STU/TE/N, OR MSG/TE/A SM.
  21. *
  22. * EXIT 1. ENTRY IN CONNECTION QUEUE WITH STATUS TEXT.
  23. * 2. ENTRY IN OPERATOR RESPONSE QUEUE W/STATUS TEXT.
  24. *
  25. #
  26. #
  27. **** PROC CSESTS - XREF LIST BEGINS.
  28. #
  29. XREF
  30. BEGIN
  31. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  32. PROC SSBSBF; # STORE BIT FIELD #
  33. FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY CODE CHARACTER #
  34. PROC SSTAQE; # ADD QUEUE ENTRY #
  35. FUNC XCDD C(10); # CONVERT DECIMAL INTEGER TO DISPLAY CODE #
  36. FUNC XCHD C(10); # CONVERT HEX INTEGER TO DISPLAY CODE #
  37. END
  38. #
  39. ****
  40. #
  41. DEF TC$3270 # 18 #; # NUMERICAL VALUE FOR TC OF 3270. THIS #
  42. # IDENTIFIES THE LAST TC BEFORE THE USER#
  43. # TYPE TC-S. #
  44. DEF TC28$DIS # 9 #; # USER TC28 DISPLACEMENT IN TC TABLE #
  45. DEF TMS$TXTL # 60 #; # CHARACTER COUNT OF STATUS MESSAGE TEXT #
  46. DEF UNA$CMDL # 50 #; # CHARACTER COUNT OF UNACTIONED CMD TEXT #
  47. DEF MNS$TXTL # 40 #; # CHARACTER COUNT FOR MSG NOT SENT TEXT #
  48.  
  49.  
  50. ITEM CNST1; # CONSTANT ---> 1 #
  51. ITEM CNST2; # CONSTANT ---> 2 #
  52. ITEM CNST3; # CONSTANT ---> 3 #
  53. ITEM I; # LOOP INDUCTION VARIABLE #
  54. #
  55.   THIS ARRAY DEFINES THE BUFFER WHERE THE NAME OF THE CURRENT
  56.   DEVICE IS SAVED.
  57. #
  58. ARRAY CRNT$TNM [00:00] S(1);
  59. BEGIN
  60. ITEM CRNT$TRM C(00,18,07);
  61. END
  62. #
  63.   THIS ARRAY IS USED AS A TEMPORARY FOR CHARACTER STRINGS TO BE
  64.   PLACE IN THE TEXT CURRENTLY BEING BUILT.
  65. #
  66. ARRAY CTEMP$WORD [00:00] S(1);
  67. BEGIN
  68. ITEM CTEMP C(00,00,10);
  69. ITEM UTEMP U(00,18,42);
  70. ITEM CTEMP1 C(00,54,01);
  71. ITEM CTEMP2 C(00,48,02);
  72. ITEM CTEMP3 C(00,42,03);
  73. ITEM CTEMP7 C(00,18,07);
  74. END
  75. #
  76.   THIS TABLE CONTAINS THE POSSIBLE DT VALUES THAT THE NUMERIC VALUE
  77.   WILL MAP INTO.
  78. #
  79. DEF MX$DT # 07 #;
  80. ARRAY DT$TABLE [00:MX$DT] S(1);
  81. BEGIN
  82. ITEM DT$VAL C(00,00,03) = ["CON",
  83. "CR ",
  84. "LP ",
  85. "CP ",
  86. "PL ",
  87. "A-A",
  88. "A-A",
  89. "DT7"
  90. ];
  91. END
  92. #
  93.   THIS ARRAY DEFINE THE -MESSAGE NOT SENT- TEXT.
  94. #
  95. ARRAY MNS$TXT [00:00] S(4);
  96. BEGIN
  97. ITEM MNS$NPU C(00,00,05) =["NPU: "];
  98. ITEM MNS$NNM C(00,30,07);
  99. ITEM MNS$MNS C(01,12,18) = [", MESSAGE NOT SENT"];
  100. ITEM MNS$ZBYT I(03,00,60) = [0];
  101. END
  102. #
  103.   THIS TABLE CONTAINS ALL THE POSSIBLE STATUS THAT A DEVICE CAN HAVE
  104. #
  105. DEF MX$ST # 5 #;
  106. ARRAY ST$TABLE [01:MX$ST] S(1);
  107. BEGIN
  108. ITEM ST$VAL C(00,00,02) = ["NC",
  109. "DI",
  110. "DN",
  111. "EN",
  112. "AC",
  113. ];
  114. END
  115. #
  116.   THIS TABLE CONTAINS ALL THE POSSIBLE TERMINAL CLASSES A DEVICE CAN
  117.   BE.
  118. #
  119. DEF MX$TC # 22 #;
  120. ARRAY TC$TABLE [00:MX$TC] (1);
  121. BEGIN
  122. ITEM TC$VAL C(00,00,05) = ["UNK ",
  123. "M33 ",
  124. "713 ",
  125. "721 ",
  126. "2741 ",
  127. "M40 ",
  128. "H2000",
  129. "X364 ",
  130. "T4014",
  131. "HASP ",
  132. "200UT",
  133. "714X ",
  134. "711 ",
  135. "714 ",
  136. "HPRE ",
  137. "734 ",
  138. "2780 ",
  139. "3780 ",
  140. "3270",
  141. "TC28 ",
  142. "TC29 ",
  143. "TC30 ",
  144. "TC31 "
  145. ];
  146. END
  147. #
  148.   THIS ARRAY DEFINES THE TEXT OF THE TERMINAL STATUS MESSAGE
  149.   FORMATTED BY THIS PROC.
  150. #
  151. ARRAY TMS$TXT [00:05] S(1);
  152. BEGIN
  153. ITEM TMS$TIM C(00,00,10);
  154. ITEM TMS$TRM C(01,00,06) = ["TERM: "];
  155. ITEM TMS$TNM C(01,36,07);
  156. ITEM TMS$C1 C(02,18,01) = [","];
  157. ITEM TMS$ST C(02,24,02);
  158. ITEM TMS$C2 C(02,36,01) = [","];
  159. ITEM TMS$DT C(02,42,03);
  160. ITEM TMS$S1 C(03,00,01) = ["/"];
  161. ITEM TMS$TC C(03,06,05);
  162. ITEM TMS$C3 C(03,36,01) = [","];
  163. ITEM TMS$HN C(03,42,03);
  164. ITEM TMS$C4 C(04,00,01) = [","];
  165. ITEM TMS$LNM C(04,06,07);
  166. ITEM TMS$S2 C(04,48,01) = ["/"];
  167. ITEM TMS$A1 C(04,54,02);
  168. ITEM TMS$S3 C(05,06,01) = ["/"];
  169. ITEM TMS$A2 C(05,12,02);
  170. ITEM TMS$ZBYT U(05,24,36) = [ 0 ];
  171. END
  172. #
  173.   THIS ARRAY DEFINES THE TEXT FOR -UNACTIONED COMMAND-.
  174. #
  175. ARRAY UNA$CMD [00:00] S(5);
  176. BEGIN
  177. ITEM UNA$TIM C(00,00,10) = [" "];
  178. ITEM UNA$TRM C(01,00,06) = ["TERM: "];
  179. ITEM UNA$TNM C(01,36,07);
  180. ITEM UNA$TXT C(02,18,20) = [", UNACTIONED COMMAND"];
  181. ITEM UNA$ZBYT2 U(04,18,42) = [ 0 ];
  182. END
  183. CONTROL EJECT;
  184. # #
  185. # CSESTS CODE BEGINS HERE #
  186. # #
  187. #
  188. * BEGIN CONSTRUCTING THE LINE IMAGE FOR THE TERMINAL STATUS. CON-
  189. * VERT THE ASCII TERMINAL NAME TO DISPLAY CODE AND PLACE IT IN THE
  190. * TEXT. CONVERT THE STATUS, DEVICE TYPE, TERMINAL CLASS AND HOST
  191. * I.D. FIELDS AND INSERT THEM INTO THE TEXT. USING THE PORT NUMBER
  192. * AND SOURCE NODE FIELDS, SEARCH FOR THE NAME OF THE LINE SUPPORTING
  193. * THE DEVICE. IF FOUND, INSERT THE NAME INTO THE TEXT, ELSE USE
  194. * -UNKNOWN- AS NAME AND INSERT INTO TEXT. CONVERT THE A1 AND A2
  195. * FIELDS AND INSERT THEM INTO THE TEXT.
  196. #
  197.  
  198.  
  199. FOR I=0 STEP 1 UNTIL 6
  200. DO
  201. BEGIN
  202. B<(I*6),6>UTEMP[0] = SSDCAD(B<I*8,8>STUTN[0]);
  203. END
  204. CNST1 = 1;
  205. CNST2 = 36;
  206. CNST3 = 42;
  207. SSBSBF(TMS$TXT,CNST1,CNST2,CNST3,CTEMP$WORD);
  208. CRNT$TRM[0] = CTEMP7[0];
  209.  
  210.  
  211. TMS$ST[0] = ST$VAL[STUSTT[0]];
  212.  
  213.  
  214. TMS$DT[0] = DT$VAL[STUDT[0]];
  215.  
  216.  
  217. IF STUTC[0] LQ TC$3270
  218. THEN
  219. BEGIN
  220. TMS$TC[0] = TC$VAL[STUTC[0]];
  221. END
  222. ELSE
  223. BEGIN
  224. TMS$TC[0] = TC$VAL[STUTC[0] - TC28$DIS];
  225. END
  226.  
  227.  
  228. CTEMP[0] = XCDD(1000 + STUHN[0]);# CAUSES LEADING ZEROES #
  229. TMS$HN[0] = CTEMP3[0];
  230.  
  231.  
  232. FOR I=0 STEP 1 WHILE NOT(ABHSN[0] EQ LIX$NID[I] AND
  233. STUP[0] EQ LIX$PORT[I]) AND
  234. I LS LIXL
  235. DO
  236. BEGIN
  237. END
  238. IF I LS LIXL
  239. THEN
  240. BEGIN
  241. TMS$LNM[0] = LIX$NAME[I];
  242. END
  243. ELSE
  244. BEGIN
  245. TMS$LNM[0] = "UNKNOWN";
  246. END
  247.  
  248.  
  249. CTEMP[0] = XCHD(X"100" + STUA1[0]);
  250. CNST1 = 4;
  251. CNST2 = 54;
  252. CNST3 = 12;
  253. SSBSBF(TMS$TXT[0],CNST1,CNST2,CNST3,CTEMP$WORD);
  254.  
  255.  
  256. CTEMP[0] = XCHD(X"100" + STUA2[0]);
  257. TMS$A2[0] = CTEMP2[0];
  258.  
  259.  
  260. #
  261. * IF THIS SM IS STU/TE/U, GET THE CURRENT TIME AND APPEND IT TO THE
  262. * BEGINNING OF THE STATUS TEXT. SEND THE TEXT OFF TO THE OPERATOR
  263. * GROUP RESPONSE QUEUE WITH A GROUP AUDIENCE OF ONE. IF THE REASON
  264. * CODE INDICATES NOT CONFIGURED OR ALREADY IN DESIRED STATE, THEN
  265. * SEND THE -UNACTIONED COMMAND- TEXT TO THE OPERATOR GROUP RESPONSE
  266. * QUEUE WITH A GROUP AUDIENCE OF ONE.
  267. #
  268. IF WCB$SMID[0] EQ SMID"STUTE"
  269. THEN
  270. BEGIN
  271. TMS$TIM[0] = CTM$CLOCK[0];
  272.  
  273.  
  274. WCB$WORD[1] = 0;
  275. WCB$WC[1] = 2 + (TMS$TXTL / 10);
  276.  
  277.  
  278. ABHWORD[1] = TMS$TXTL;
  279. ABHADR[1] = AUDGR3$;
  280. FOR I=0 STEP 1 WHILE NPU$NID[I] NQ ABHSN[0] AND
  281. I LS CSNPCNT
  282. DO
  283. BEGIN
  284. END
  285. ABHABN[1] = I;
  286.  
  287.  
  288. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],TMS$TXT[0]);
  289. CSESLE(ABHSN[0],WCBUF[1],TMS$TXT);
  290.  
  291.  
  292. IF STURCT[0] EQ RRCT"UC"
  293. THEN
  294. BEGIN
  295. WCB$WC[1] = 2 + (UNA$CMDL / 10);
  296.  
  297.  
  298. ABHTLC[1] = UNA$CMDL;
  299.  
  300.  
  301.  
  302.  
  303. CNST1 = 1;
  304. CNST2 = 36;
  305. CNST3 = 42;
  306. SSBSBF(UNA$CMD,CNST1,CNST2,CNST3,CRNT$TNM);
  307.  
  308.  
  309. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],UNA$CMD[0]);
  310. CSESLE(ABHSN[0],WCBUF[1],UNA$CMD);
  311. END
  312. END
  313. #
  314. * IF THIS SM IS STU/TE/N OR MSG/TE/A, THEN SEND THE STATUS TEXT TO
  315. * THE OPERATOR IDENTIFIED BY THE ACN OF IN INCOMING SM.
  316. #
  317. ELSE # ASSUMED TO BE STU/TE/N OR MSG/TE/A #
  318. BEGIN
  319. WCB$WORD[1] = 0;
  320. WCB$WC[1] = 2 + (TMS$TXTL / 10) - 1; # SUBTRACT TIME WORD #
  321. WCB$SMID[1] = SMID"TTEXT";
  322.  
  323.  
  324. ABHWORD[1] = 0;
  325. ABHADR[1] = ABHCN[0];
  326. ABHTLC[1] = TMS$TXTL - 10; # SUBTRACT WORD CONTAINING TIME #
  327.  
  328.  
  329. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],TMS$TXT[1]);
  330. #
  331. * IF THIS SM IS MSG/TE/A, THEN LOCATED THE SUPPORTING NPU NAME IN
  332. * NPUCB TABLE AND INSERT IN -MESSAGE NOT SENT- TEXT. SEND THE TEXT
  333. * TO THE OPERATOR IDENTIFIED BY THE ACN IN THE INCOMING SM WITH THE
  334. * INPUT ALLOW FLAG SET.
  335. #
  336. IF WCB$SMID[0] EQ SMID"MSGTEA"
  337. THEN
  338. BEGIN
  339. FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND
  340. I LS CSNPCNT
  341. DO
  342. BEGIN
  343. END
  344. IF I LS CSNPCNT
  345. THEN
  346. BEGIN
  347. CNST1 = 0;
  348. CNST2 = 30;
  349. CNST3 = 42;
  350. SSBSBF(MNS$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$WORD[I]);
  351. END
  352.  
  353.  
  354. WCB$WC[1] = 2 + (MNS$TXTL / 10);
  355. WCB$IAF[1] = TRUE;
  356.  
  357.  
  358. ABHTLC[1] = MNS$TXTL;
  359.  
  360.  
  361. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],MNS$TXT);
  362. END
  363. END
  364.  
  365.  
  366. RETURN; # **** RETURN **** #
  367. END # CSESTS #
  368. TERM
cdc/nos2.source/nam5871/csests.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator