User Tools

Site Tools


cdc:nos2.source:nam5871:csesls

CSESLS

Table Of Contents

  • [00007] PROC CSESLS
  • [00008] SEND LINE STATUS.
  • [00011] SEND LINE STATUS.
  • [00031] PROC CSESLE
  • [00032] PROC SSBSBF
  • [00033] PROC SSTAQE
  • [00034] FUNC XCHD C(10)

Source Code

CSESLS.txt
  1. *DECK CSESLS
  2. USETEXT TEXTOV
  3. USETEXT TEXTCS
  4. USETEXT TEXTSS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSMCS
  7. PROC CSESLS;
  8. # TITLE - SEND LINE STATUS. #
  9. BEGIN
  10. #
  11. ** CSESLS - SEND LINE STATUS.
  12. *
  13. * D.K. ENDO 82/03/17
  14. *
  15. * THIS PROCEDURE FORMATS A LINE STATUS TEXT AND SENDS IT OUT TO THE
  16. * OPERATORS.
  17. *
  18. * PROC CSESLS
  19. *
  20. * ENTRY 1. STU/LI/U, STU/LI/N, OR MSG/LI/A SM.
  21. *
  22. * EXIT 1. LINE STATUS TEXT IN THE OPERATOR RESPONSE QUEUE.
  23. * 2. TEXT SENT TO THE C-LAYER VIA THE CONNECTION QUEUE.
  24. *
  25. #
  26. #
  27. **** PROC CSESLS - XREF LIST BEGINS.
  28. #
  29. XREF
  30. BEGIN
  31. PROC CSESLE; # SEND LOG (FILE) ENTRY #
  32. PROC SSBSBF; # STORE BIT FIELD #
  33. PROC SSTAQE; # ADD QUEUE ENTRY #
  34. FUNC XCHD C(10); # CONVERT HEX INTEGER TO DISPLAY CODE #
  35. END
  36. #
  37. ****
  38. #
  39. DEF ADS$TXTL # 40 #; # CHAR COUNT OF ALREADY IN STATE TEXT #
  40. DEF CDP$TXTL # 40 #; # CHAR COUNT OF CE DIAG IN PROGRESS TEXT #
  41. DEF DCA$TXTL # 40 #; # CHAR COUNT OF DUP CLA ADDRESS TEXT #
  42. DEF LNS$TXTL # 50 #; # CHAR COUNT OF LINE STATUS TEXT #
  43. DEF MNS$TXTL # 40 #; # CHAR COUNT OF MSG NOT SENT TEXT #
  44. DEF NTC$TXTL # 40 #; # CHAR COUNT OF NO TERMS CONFIG TEXT #
  45. DEF NTE$TXTL # 40 #; # CHAR COUNT OF NO TERMS ENABLED TEXT #
  46. DEF TNC$TXTL # 40 #; # CHAR COUNT OF TIP NOT CONFIGURED TEXT #
  47.  
  48.  
  49. ITEM CNST1; # CONSTANT ---> 1 #
  50. ITEM CNST2; # CONSTANT ---> 2 #
  51. ITEM CNST3; # CONSTANT ---> 3 #
  52. ITEM I; # LOOP INDUCTION VARIABLE #
  53. ITEM GOODRC B; # FLAG INDICATING GOOD REASON CODE #
  54.  
  55.  
  56. #
  57.   THIS ARRAY DEFINES THE -ALREADY IN DESIRED STATE- MESSAGE TEXT.
  58.   IT IS SENT WHEN A STU/LI/U SM COMES IN AND THE REASON CODE FIELD
  59.   IS EIGHT.
  60. #
  61. ARRAY ADS$TXT [00:00] S(4);
  62. BEGIN
  63. ITEM ADS$TIM C(00,00,10) = [" "];
  64. ITEM ADS$MSG C(01,00,25) = [" ALREADY IN DESIRED STATE"];
  65. ITEM ADS$ZBYT1 U(03,30,30) = [ 0 ];
  66. END
  67.  
  68.  
  69. #
  70.   THIS ARRAY DEFINES THE -CE DIAGNOSTICS IN PROGRESS- MESSAGE TEXT.
  71.   IT IS SENT WHEN A STU/LI/U SM COMES IN AND THE REASON CODE FIELD
  72.   IS SET TO SEVEN.
  73. #
  74. ARRAY CDP$TXT [00:00] S(4);
  75. BEGIN
  76. ITEM CDP$TIM C(00,00,10) = [" "];
  77. ITEM CDP$MSG C(01,00,25) = [" CE DIAG TEST IN PROGRESS"];
  78. ITEM CDP$ZBYT1 U(03,30,30) = [ 0 ];
  79. END
  80.  
  81.  
  82. #
  83.   THIS ARRAY IS USED AS A TEMPORY FOR STORING A CHARACTER STRING TO
  84.   BE LATER PLACE IN THE TEXT.
  85. #
  86. ARRAY CTEMP$WORD [00:00] S(1);
  87. BEGIN
  88. ITEM CTEMP C(00,00,10);
  89. ITEM CTEMP2 C(00,48,02);
  90. END
  91.  
  92.  
  93. #
  94.   THIS ARRAY DEFINES THE -DUPLICATE CLA ADDRESS- MESSAGE TEXT. IT
  95.   IS SENT OUT WHEN AN INCOMING STU/LI/U HAS A REASON CODE SET TO SIX
  96. #
  97. ARRAY DCA$TXT [00:00] S(4);
  98. BEGIN
  99. ITEM DCA$TIM C(00,00,10) = [" "];
  100. ITEM DCA$MSG C(01,00,22) = [" DUPLICATE CLA ADDRESS"];
  101. ITEM DCA$ZBYT U(03,12,48) = [ 0 ];
  102. END
  103.  
  104.  
  105. #
  106.   THIS BASED ARRAY IS USED AS A TEMPLATE TO GO OVER ONE OF THE
  107.   MESSAGES SENT WHEN THE REASON CODE FIELD OF THE STU/LI/U SM IS
  108.   NON ZERO.
  109. #
  110. BASED ARRAY ERR$MSG [00:00] S(6);
  111. BEGIN
  112. ITEM ERM$TIM C(00,00,10);
  113. ITEM ERM$LNM C(01,36,07);
  114. END
  115.  
  116.  
  117. #
  118.   THIS ARRAY DEFINES THE LINE STATUS TEXT SENT TO THE OPERATORS.
  119. #
  120. ARRAY LNS$TXT [00:04] S(1);
  121. BEGIN
  122. ITEM LNS$TIM C(00,00,10);
  123. ITEM LNS$LIN C(01,00,06) = ["LINE: "];
  124. ITEM LNS$LNM C(01,36,07);
  125. ITEM LNS$C1 C(02,18,01) = [","];
  126. ITEM LNS$ST C(02,24,02);
  127. ITEM LNS$C2 C(02,36,01) = [","];
  128. ITEM LNS$LT C(02,42,02);
  129. ITEM LNS$C3 C(02,54,01) = [","];
  130. ITEM LNS$NNM C(03,00,07);
  131. ITEM LNS$S1 C(03,42,01) = ["/"];
  132. ITEM LNS$PRT C(03,48,02);
  133. ITEM LNS$ZBYT U(04,00,60) = [ 0 ];
  134. END
  135.  
  136.  
  137. #
  138.   THIS TABLE CONTAINS ALL THE POSSIBLE LINE TYPES. THE NUMERIC
  139.   VALUE MAPS DIRECTLY INTO THE TABLE.
  140. #
  141. DEF MX$LT # 12 #;
  142. ARRAY LT$TABLE [01:MX$LT] S(1);
  143. BEGIN
  144. ITEM LT$VAL C(00,00,02) = ["S1",
  145. "S2",
  146. "S3",
  147. ,,
  148. "A1",
  149. "A2",
  150. ,
  151. "A6",
  152. "H1",
  153. "S4",
  154. "H2"
  155. ];
  156. END
  157.  
  158.  
  159. #
  160.   THIS ARRAY DEFINES THE -MESSAGE NOT SENT- MESSAGE TEXT. IT IS
  161.   SENT WHEN THERE IS AN INCOMING MSG/LI/A SM.
  162. #
  163. ARRAY MNS$TXT [00:00] S(4);
  164. BEGIN
  165. ITEM MNS$NPU C(00,00,05) = ["NPU: "];
  166. ITEM MNS$NNM C(00,30,07);
  167. ITEM MNS$MSG C(01,12,18) = [", MESSAGE NOT SENT"];
  168. ITEM MNS$ZBYT U(03,00,60) = [ 0 ];
  169. END
  170.  
  171.  
  172. #
  173.   THIS ARRAY DEFINES THE -NO TERMINALS CONFIGUED- MESSAGE TEXT.
  174.   IT IS SENT OUT WHEN AN INCOMING STU/LI/U HAS A REASON CODE SET
  175.   TO TWO.
  176. #
  177. ARRAY NTC$TXT [00:00] S(4);
  178. BEGIN
  179. ITEM NTC$TIM C(00,00,10) = [" "];
  180. ITEM NTC$MSG C(01,00,24) = [" NO TERMINALS CONFIGURED"];
  181. ITEM NTC$ZBYT U(03,24,36) = [ 0 ];
  182. END
  183.  
  184.  
  185. #
  186.   THIS ARRAY DEFINES THE -NO TERMINALS ENABLED- MESSAGE TEXT. IT
  187.   IS SENT OUT WHEN AN INCOMING STU/LI/U HAS A REASON CODE SET TO
  188.   ONE.
  189. #
  190. ARRAY NTE$TXT [00:00] S(4);
  191. BEGIN
  192. ITEM NTE$TIM C(00,00,10) = [" "];
  193. ITEM NTE$MSG C(01,00,21) = [" NO TERMINALS ENABLED"];
  194. ITEM NTE$ZBYT U(03,06,54) = [ 0 ];
  195. END
  196.  
  197.  
  198. #
  199.   THIS CONTAINS ALL THE POSSIBLE STATUS THAT THE LINE CAN HAVE. IT
  200.   CAN BE MAPPED DIRECT TO THE NUMERIC STATUS VALUE IN THE INCOMING
  201.   SM.
  202. #
  203. DEF MX$ST # 5 #;
  204. ARRAY ST$TABLE [01:MX$ST] S(1);
  205. BEGIN
  206. ITEM ST$VAL C(00,00,02) = ["NC",
  207. "DI",
  208. "DN",
  209. "EN",
  210. "AC",
  211. ];
  212. END
  213.  
  214.  
  215. #
  216.   THIS ARRAY DEFINES THE -TIP NOT CONFIGURED- MESSAGE TEXT. IT IS
  217.   SENT WHEN AN INCOMING STU/LI/U SM HAS A REASON CODE SET TO FIVE.
  218. #
  219. ARRAY TNC$TXT [00:00] S(4);
  220. BEGIN
  221. ITEM TNC$TIM C(00,00,10) = [" "];
  222. ITEM TNC$MSG C(01,00,20) = [" TIP NOT CONFIGURED"];
  223. ITEM TNC$ZBYT U(03,00,60) = [ 0 ];
  224. END
  225.  
  226.  
  227. #
  228.   THIS ARRAY IS USED TO STORE THE LINE NAME TO BE INSERTED INTO THE
  229.   TEXT WHEN ONE IS NOT FOUND.
  230. #
  231. ARRAY UNK$TXT [00:00] S(1);
  232. BEGIN
  233. ITEM UNK$NAM C(00,18,07) = ["UNKNOWN"];
  234. END
  235. CONTROL EJECT;
  236. # #
  237. # CSESLS CODE BEGINS HERE #
  238. # #
  239. #
  240. * FORMAT THE LINE STATUS TEXT. SEARCH THE LINE XREF TABLE, GIVEN
  241. * THE PORT AND NODE I.D. AND FIND THE NAME FOR THIS LINE. IF A NAME
  242. * IS FOUND INSERT NAME INTO TEXT, ELSE INSERT -UNKNOWN- INTO TEXT.
  243. * INSERT THE STATUS AND LTYPE INTO THE TEXT. SEARCH NPUCB-S FOR THE
  244. * NAME OF THE NPU SUPPORTING THE LINE. IF FOUND, INSERT NAME INTO
  245. * TEXT. CONVERT THE PORT NUMBER AND APPEND IT TO THE TEXT.
  246. #
  247. FOR I=0 STEP 1 WHILE NOT(STUP[0] EQ LIX$PORT[I] AND
  248. ABHSN[0] EQ LIX$NID[I]) AND
  249. I LS LIXL
  250. DO
  251. BEGIN
  252. END
  253. IF I LS LIXL
  254. THEN
  255. BEGIN
  256. CNST1 = 1;
  257. CNST2 = 36;
  258. CNST3 = 42;
  259. SSBSBF(LNS$TXT,CNST1,CNST2,CNST3,B<0,42>LIX$WORD[I]);
  260. END
  261. ELSE
  262. BEGIN
  263. CNST1 = 1;
  264. CNST2 = 36;
  265. CNST3 = 42;
  266. SSBSBF(LNS$TXT,CNST1,CNST2,CNST3,UNK$TXT);
  267. END
  268.  
  269.  
  270. LNS$ST[0] = ST$VAL[STUSTI[0]];
  271.  
  272.  
  273. LNS$LT[0] = LT$VAL[STULT[0]];
  274.  
  275.  
  276. FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND
  277. I LS CSNPCNT
  278. DO
  279. BEGIN
  280. END
  281. IF I LS CSNPCNT
  282. THEN
  283. BEGIN
  284. LNS$NNM[0] = NPU$NAME[I];
  285. END
  286. ELSE
  287. BEGIN
  288. LNS$NNM[0] = " ";
  289. END
  290.  
  291.  
  292. CTEMP[0] = XCHD(STUP[0] + X"100");
  293. LNS$PRT[0] = CTEMP2[0];
  294. #
  295. * IF THIS SM IS STU/LI/U, APPEND THE CURRENT TIME TO THE TEXT. SET
  296. * THE AUDIENCE GROUP TO ONE AND SEND IT OFF TO THE OPERATOR RESPONSE
  297. * QUEUE. IF THE REASON CODE IS NOT ZERO, THEN APPEND A MESSAGE,
  298. * BASED ON THE RC, TO THE TIME AND SEND THE MESSAGE OFF TO THE ORQ
  299. * WITH AN AUDIENCE GROUP OF ONE.
  300. #
  301. IF WCB$SMID[0] EQ SMID"STULI"
  302. THEN
  303. BEGIN
  304. LNS$TIM[0] = CTM$CLOCK[0];
  305.  
  306.  
  307. WCB$WORD[1] = 0;
  308. WCB$WC[1] = 2 + (LNS$TXTL / 10);
  309.  
  310.  
  311. ABHWORD[1] = LNS$TXTL;
  312. ABHADR[1] = AUDGR3$;
  313. ABHABN[1] = I;
  314.  
  315.  
  316. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],LNS$TXT[0]);
  317. CSESLE(ABHSN[0],WCBUF[1],LNS$TXT);
  318.  
  319.  
  320. IF STURCL[0] NQ 0
  321. THEN
  322. BEGIN
  323. GOODRC = FALSE;
  324.  
  325.  
  326. IF STURCL[0] EQ RRCI"N1"
  327. THEN # NO TERMS ENABLED, RC=1 #
  328. BEGIN
  329. P<ERR$MSG> = LOC(NTE$TXT);
  330. ABHTLC[1] = NTE$TXTL;
  331. GOODRC = TRUE;
  332. END
  333.  
  334.  
  335. ELSE IF STURCL[0] EQ RRCI"N2"
  336. THEN # NO TERMS CONFIGURED, RC=2 #
  337. BEGIN
  338. P<ERR$MSG> = LOC(NTC$TXT);
  339. ABHTLC[1] = NTC$TXTL;
  340. GOODRC = TRUE;
  341. END
  342.  
  343. ELSE IF STURCL[0] EQ RRCI"NT"
  344. THEN # TIP NOT CONFIGURED, RC=5 #
  345. BEGIN
  346. P<ERR$MSG> = LOC(TNC$TXT);
  347. ABHTLC[1] = TNC$TXTL;
  348. GOODRC = TRUE;
  349. END
  350.  
  351.  
  352. ELSE IF STURCL[0] EQ RRCI"DC"
  353. THEN # DUPLICATE CLA ADDRESS, RC=6 #
  354. BEGIN
  355. P<ERR$MSG> = LOC(DCA$TXT);
  356. ABHTLC[1] = DCA$TXTL;
  357. GOODRC = TRUE;
  358. END
  359.  
  360.  
  361. ELSE IF STURCL[0] EQ RRCI"CD"
  362. THEN # CE DIAGNOSTICS IN PROGESS,RC=7#
  363. BEGIN
  364. P<ERR$MSG> = LOC(CDP$TXT);
  365. ABHTLC[1] = CDP$TXTL;
  366. GOODRC = TRUE;
  367. END
  368.  
  369.  
  370. ELSE IF STURCL[0] EQ RRCI"UC"
  371. THEN # ALREADY IN DESIRED STATE, RC=8#
  372. BEGIN
  373. P<ERR$MSG> = LOC(ADS$TXT);
  374. ABHTLC[1] = ADS$TXTL;
  375. GOODRC = TRUE;
  376. END
  377.  
  378.  
  379.  
  380. IF GOODRC
  381. THEN
  382. BEGIN
  383. WCB$WC[1] = 2 + (ABHTLC[1] / 10 );
  384.  
  385.  
  386. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],ERR$MSG[0]);
  387. CSESLE(ABHSN[0],WCBUF[1],ERR$MSG);
  388. END
  389. END
  390. END
  391. #
  392. * IF THIS SM IS STU/LI/N OR MSG/LI/A, THEN SEND THE STATUS TEXT TO
  393. * THE OPERATOR IDENTIFIED BY THE ACN WITH THE INPUT ALLOW FLAG
  394. * CLEARED. IF THIS SM IS MSG/LI/A, APPEND THE NPU NAME TO THE -NOT
  395. * SENT- MESSAGE AND SEND IT TO THE OPERATOR WITH THE INPUT ALLOWED
  396. * FLAG SET.
  397. #
  398. ELSE # THE SM WAS NOT STU/LI/U, ASSUME IT IS #
  399. BEGIN # STU/LI/N OR MSG/LI/A #
  400. WCB$WORD[1] = 0;
  401. WCB$SMID[1] = SMID"TTEXT";
  402. WCB$WC[1] = 2 + (LNS$TXTL / 10) - 1;
  403.  
  404.  
  405. ABHWORD[1] = 0;
  406. ABHADR[1] = ABHCN[0];
  407. ABHTLC[1] = LNS$TXTL - 10;
  408.  
  409.  
  410. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],LNS$TXT[1]);
  411.  
  412.  
  413. IF WCB$SMID[0] EQ SMID"MSGLIA"
  414. THEN
  415. BEGIN
  416.  
  417. FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND
  418. I LS CSNPCNT
  419. DO
  420. BEGIN
  421. END
  422. IF I LS CSNPCNT
  423. THEN
  424. BEGIN
  425. CNST1 = 0;
  426. CNST2 = 30;
  427. CNST3 = 42;
  428. SSBSBF(MNS$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$WORD[I]);
  429. END
  430.  
  431. WCB$IAF[1] = TRUE;
  432. WCB$WC[1] = 2 + (MNS$TXTL / 10);
  433.  
  434.  
  435. ABHTLC[1] = MNS$TXTL;
  436.  
  437.  
  438. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],MNS$TXT[0]);
  439. END
  440. END
  441.  
  442.  
  443. RETURN;
  444. END # CSESLS #
  445. TERM
cdc/nos2.source/nam5871/csesls.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator