User Tools

Site Tools


cdc:nos2.source:nam5871:cssast

CSSAST

Table Of Contents

  • [00008] PROC CSSAST
  • [00009] CSSAST - ACTION STATUS COMMAND.
  • [00014] ACTION STATUS COMMAND.
  • [00050] PROC SSTAQE
  • [00051] FUNC SSDCDA
  • [00053] PROC SSBEBF
  • [00054] PROC SSBSBF
  • [00055] PROC SSBSBW
  • [00056] PROC MESSAGE
  • [00057] PROC MOVEI
  • [00058] PROC ABORT

Source Code

CSSAST.txt
  1. *DECK CSSAST
  2. USETEXT TEXTCS;
  3. USETEXT TEXTSS;
  4. USETEXT TXTSMCS;
  5. USETEXT TXTAPSS;
  6. USETEXT TXTSUSS;
  7. USETEXT TXCMDCS;
  8. PROC CSSAST;
  9. # TITLE CSSAST - ACTION STATUS COMMAND. #
  10.  
  11. BEGIN # CSSAST #
  12.  
  13. #
  14. ** CSSAST - ACTION STATUS COMMAND.
  15. *
  16. * C. BRION 82/04/23.
  17. *
  18. * THIS PROCEDURE PERFORMS THE PROCESSING OF ALL STATUS COMMANDS.
  19. *
  20. * PROC CSSAST
  21. *
  22. * ENTRY:
  23. * WCBUF = WORD COUNT WORD OF ENTRY THAT CONTAINS THE STATUS
  24. * COMMAND THAT HAS BEEN RESOLVED INTO A ROUTED
  25. * COMMAND.
  26. * HDRCMD = ONE WORD ARRAY THAT CONTAINS PERTINENT INFORMATION
  27. * ABOUT THE COMMAND.
  28. * PARMS = ARRAY THAT CONTAINS THE COMMAND TEXT, THE SYNTAX
  29. * PARAMETER LIST AND THE ADDRESS PARAMETER LIST.
  30. *
  31. * EXIT:
  32. * THE APPROPRIATE SUPERVISORY MESSAGE OR MESSAGES WILL BE SENT
  33. * TO THE APPROPRIATE NPUS.
  34. *
  35. * AN INFORMATIVE MESSAGE MAY BE SENT TO THE ORIGIN OPERATOR IN
  36. * CASE OF AN ERROR WITH THE COMMAND PROCESSING.
  37. *
  38. * THE APPROPRIATE NPUCB AND OCB TABLE ENTRIES WILL BE UPDATED
  39. * AS APPROPRIATE.
  40. *
  41. #
  42.  
  43. #
  44. **** PROC CSSAST XREF LIST.
  45. #
  46.  
  47. XREF
  48.  
  49. BEGIN
  50. PROC SSTAQE; # SS- ACCEPT QUEUE ENTRY #
  51. FUNC SSDCDA; # SS- CONVERT DISPLAY CODE #
  52. # TO ASCII CHARACTER #
  53. PROC SSBEBF; # SS- EXTRACT BIT FIELD #
  54. PROC SSBSBF; # SS- STORE BIT FIELD #
  55. PROC SSBSBW; # SS- SET BIT IN WORD #
  56. PROC MESSAGE; # MACREL MSG TO DAYFILE #
  57. PROC MOVEI; # MOVE WORDS INDIRECT #
  58. PROC ABORT; # MACREL PROGRAM ABORT #
  59. END
  60.  
  61. #
  62. ****
  63. #
  64.  
  65. #
  66. * PROC CSSAST DEFINITIONS
  67. #
  68.  
  69. DEF ASCBLNK2$ # O"040040" #; # 2 ASCII BLANKS #
  70.  
  71.  
  72. #
  73. * STATUS AND SWITCH DEFINITIONS.
  74. #
  75.  
  76. #
  77. * STATLST - LIST OF ELEMENT STATUS VALUES.
  78. #
  79.  
  80. STATUS STATLST
  81. ALL,
  82. NC,
  83. DI,
  84. DN,
  85. EN,
  86. ACT;
  87.  
  88. #
  89. * CMDLST - LIST OF TYPE OF COMMANDS.
  90. #
  91.  
  92. STATUS CMDLST
  93. SINGLE,
  94. MULTIPLE;
  95.  
  96.  
  97. #
  98. * ELMLST - LIST OF COMMAND ELEMENT VALUES.
  99. #
  100.  
  101. STATUS ELMLST
  102. TERM,
  103. TERMS,
  104. LINE,
  105. LINES,
  106. CUPLR,
  107. CUPLRS,
  108. TRUNK,
  109. TRUNKS,
  110. NPU,
  111. NPUS,
  112. LLINK,
  113. LLINKS,
  114. SVC,
  115. SVCS;
  116.  
  117. #
  118. * BLDSM - SWITCH FOR BUILDING THE APPROPRIATE SM.
  119. #
  120.  
  121. SWITCH BLDSM:ELMLST
  122. BLDTERM:TERM,
  123. BLDTERMS:TERMS,
  124. BLDLINE:LINE,
  125. BLDLINES:LINES,
  126. BLDCUPLR:CUPLR,
  127. BLDCUPLRS:CUPLRS,
  128. BLDTRUNK:TRUNK,
  129. BLDTRUNKS:TRUNKS,
  130. BLDNPU:NPU,
  131. BLDNPU:NPUS,
  132. BLDLLINK:LLINK,
  133. BLDLLINKS:LLINKS,
  134. BLDSVC:SVC,
  135. BLDSVCS:SVCS;
  136.  
  137.  
  138. #
  139. * PROC CSSAST ITEM DEFINITIONS.
  140. #
  141.  
  142. ITEM OCBORD U; # OCB ORDINAL #
  143. ITEM NPUORD U; # NPUCB ORDINAL #
  144. ITEM BEGSYIX U; # INDEX VARIABLES #
  145. ITEM FINSYIX U;
  146. ITEM BEGAPIX U;
  147. ITEM FINAPIX U;
  148. ITEM ELMIDX U;
  149. ITEM NORIDX U;
  150. ITEM QELIDX U;
  151. ITEM K,L,I,M,Y U; # LOOP VARIABLES #
  152. ITEM DORD,DBIT U; # CONVERSION VARS #
  153. ITEM AORD,ABIT U;
  154. ITEM SINGCHR U; # CHARACTER HOLDING VAR #
  155. ITEM SENT B;
  156. ITEM DONE B;
  157. ITEM MATCH B;
  158. ITEM NPSFLAG B; # SET WHEN NPUS IS SPECIFED #
  159.  
  160. $BEGIN
  161. ITEM DBVAR U; # DEBUG VARIABLE #
  162. $END
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. #
  171. * PROC CSSAST ARRAY DEFINITIONS.
  172. #
  173.  
  174. #
  175. * LLINFO - LLINK INFORMATION PACKET.
  176. #
  177.  
  178. ARRAY LLINFO [00:01] S(1);
  179.  
  180. BEGIN
  181. ITEM LLI$WORD U(00,00,60); # FULL WORD REF #
  182. ITEM LLI$LLAIX U(00,00,08); # LLINK ADDRESS PARAMETER #
  183. # WORD INDEX #
  184. ITEM LLI$NORIX U(00,08,08); # NPU ORDINAL PARAMETER #
  185. # WORD INDEX #
  186. ITEM LLI$NPORD U(00,16,12); # NPU NODE ID OF ORDINAL NPU #
  187. END
  188.  
  189. #
  190. * CMDPKT - COMMAND DESCRIPTION PACKET.
  191. #
  192.  
  193. ARRAY CMDPKT [00:00] S(1);
  194.  
  195. BEGIN
  196. ITEM CMD$WORD U(00,00,60); # FULL WORD REF #
  197. ITEM CMD$ELMID U(00,00,08); # CMD ELEMENT ID #
  198. ITEM CMD$TYPE S:CMDLST (00,08,02); # TYPE, SINGLE, MULTIPLE #
  199. ITEM CMD$PFC U(00,10,08); # CMD SM PFC #
  200. ITEM CMD$SFC U(00,18,08); # CMD SM SFC #
  201. ITEM CMD$STATUS S:STATLST (00,26,08); # CMD DESIRED STATUS #
  202. END
  203.  
  204. #
  205. * BADRCMD - DAYFILE MSG FOR BAD ROUTED COMMAND FORMAT.
  206. #
  207.  
  208. ARRAY BADRCMD [00:00] S(3);
  209.  
  210. BEGIN
  211. ITEM BAD$TXT1 C(00,00,25) = ["CSSAST-INVALID CMD FORMAT"];
  212. ITEM BAD$ZERO U(02,30,30) = [0];
  213. END
  214.  
  215.  
  216. #
  217. * HHMSG - ERROR MESSAGE FOR TERMINAL STATUS ON HOST/HOST LLINK.
  218. #
  219.  
  220. ARRAY HHMSG [00:00] S(6);
  221.  
  222. BEGIN
  223. ITEM HH$TXT1 C(00,00,20) = ["TERMINALS CANNOT CON"];
  224. ITEM HH$TXT2 C(02,00,20) = ["NECT ON HOST-HOST LO"];
  225. ITEM HH$TXT3 C(04,00,10) = ["GICAL LINK"];
  226. ITEM HH$ZERO U(05,00,60) = [0];
  227. END
  228.  
  229. #
  230. * NOSUPM - ERROR MESSAGE FOR UNSUPERVISED LLINK NODE.
  231. #
  232.  
  233. ARRAY NOSUPM [00:00] S(5);
  234.  
  235. BEGIN
  236. ITEM NO$TXT1 C(00,00,20) = ["TERMINAL NODE OF LLI"];
  237. ITEM NO$TXT2 C(02,00,03) = ["NK "];
  238. ITEM NO$NAME C(02,18,07);
  239. ITEM NO$TXT3 C(03,00,16) = [" NOT SUPERVISED "];
  240. ITEM NO$ZERO U(04,36,24) = [0];
  241. END
  242.  
  243.  
  244. #
  245. * FLG$WORD - BASED ARRAY THAT POINTS TO THE PENDING STATUS REQUEST
  246. * WORD OF THE NPUCB.
  247. #
  248.  
  249. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  250. BEGIN
  251. ITEM FW$WORD I(00,00,60);
  252. END
  253.  
  254.  
  255.  
  256.  
  257.  
  258. #
  259. * PRESET THE ORDINALS AND INDICES TO BE USED.
  260. #
  261.  
  262. WCB$WORD[1] = 0;
  263. ABHWORD[1] = 0;
  264. SPMSG0[1] = 0;
  265. SPMSG1[1] = 0;
  266. SPMSG2[1] = 0;
  267. OCBORD = HDR$OPORD[0]; # OCB ORDINAL #
  268. BEGSYIX = HDR$TXWCNT[0] + 1; # BEGINNING SYNTAX LIST INDEX#
  269. FINSYIX = HDR$TXWCNT[0] + HDR$SPCNT[0] - 1; # FINAL SYN INDX #
  270. BEGAPIX = FINSYIX + 1; # BEGINNING ADDRESS LIST INDX#
  271. IF HDR$APCNT[0] EQ 0
  272. THEN # IF THERE IS NO NPU ORD OR ELMNT ADDR #
  273. BEGIN
  274. FINAPIX = BEGAPIX; # SET FINAL AP INDEX = BEGINNING AP INDEX #
  275. END
  276. ELSE # THERE ARE NPU ORD OR ELMNT ADDR #
  277. BEGIN
  278. FINAPIX = BEGAPIX + HDR$APCNT[0] - 1; # FINAL ADDR LIST INDEX #
  279. END
  280. ELMIDX = BEGSYIX ; # ELEMENT INDEX #
  281. CMD$WORD[0] = 0; # CMD PACKET CLEAR #
  282. CMD$TYPE[0] = CMDLST"SINGLE"; # PRESET CMD TYPE #
  283.  
  284. WCB$SMID[1] = SMID"TTEXT"; # ENTRY IDENTIFIER FOR TTEXT #
  285. WCB$IAF[1] = FALSE; # INPUT ALLOWED TRUE #
  286. ABHADR[1] = OCBORD; # PRESET ADDR FOR TTEXT MSG #
  287.  
  288.  
  289. #
  290. * CHECK IF NOP KEYWORD PRESENT. IF SO, BUMP ELEMENT INDEX AND THE
  291. * BEGINNING SYNTAX PARAMETER LIST INDEX.
  292. #
  293.  
  294. IF PAR$PCODE[BEGSYIX] EQ "NOP"
  295. THEN
  296.  
  297. BEGIN
  298. BEGSYIX = BEGSYIX + 1;
  299. ELMIDX = ELMIDX + 1;
  300. END
  301.  
  302. #
  303. * DETERMINE IF NPUS WAS SPECIFIED. IF SO, THEN SET FLAG.
  304. #
  305. NPSFLAG = FALSE;
  306. FOR I=BEGSYIX STEP 1 UNTIL FINSYIX
  307. DO
  308. BEGIN
  309. IF PAR$PCODE[I] EQ "NPS"
  310. THEN
  311. BEGIN
  312. NPSFLAG = TRUE;
  313. END
  314. END
  315. #
  316. * DETERMINE THE TYPE OF COMMAND ELEMENT OF COMMAND. THE SECOND
  317. * CHARACTER OF EACH COMMAND ELEMENT KEYWORD IS UNIQUE EXCEPT FOR
  318. * THE P IN NPUS (NP0 OR NPS) AND COUPLERS (CP0 OR CPS). ONCE
  319. * THE ELEMENT TYPE IS DETERMINED, THE PFC/SFC OF A RESULTING SM IS
  320. * SET AS WELL AS THE ELEMENT IDENTIFIER. NOTE THAT THE ELEMENT
  321. * IDENTIFIER IS SET TO THE MULTIPLE VALUE OF THE ID LIST.
  322. * THE ORDER OF ELMLST IS CRUCIAL TO THE PROPER ID ASSIGNMENT.
  323. * IF LATER EXAMINATION SHOWS A MULTIPLE ELEMENT TYPE OF COMMAND,
  324. * THEN THE CMD ELEMENT ID HAS TO ONLY BE BUMPED BY 1.
  325. * NOTE THAT THE ORDER OF THE SYNTAX PARAMETER LIST IS ALSO A
  326. * CRUCIAL ASSUMPTION OF CSSAST. THE COMMAND ELEMENT, OR THE ELEMENT
  327. * TYPE BEING STATUSED, IS ALWAYS THE FIRST PARAMETER CODE/VALUE
  328. * PAIR AFTER THE VERB AND IF PRESENT THE NOP PARAMETERS.
  329. #
  330.  
  331. IF PAR$PCHR2[BEGSYIX] EQ "E" # TERMINAL #
  332. THEN
  333.  
  334. BEGIN
  335. CMD$PFC[0] = TES;
  336. CMD$SFC[0] = TE;
  337. CMD$ELMID[0] = ELMLST"TERM";
  338. END
  339.  
  340. ELSE IF PAR$PCHR2[BEGSYIX] EQ "I" # LINE #
  341. THEN
  342.  
  343. BEGIN
  344. CMD$PFC[0] = LIS;
  345. CMD$SFC[0] = LI;
  346. CMD$ELMID[0] = ELMLST"LINE";
  347. END
  348.  
  349. ELSE IF PAR$PCHR2[BEGSYIX] EQ "P" # NPU OR COUPLER #
  350. THEN
  351.  
  352. BEGIN
  353. IF PAR$PCHR1[BEGSYIX] EQ "C" # COUPLER #
  354. THEN
  355.  
  356. BEGIN
  357. CMD$PFC[0] = CPS;
  358. CMD$SFC[0] = CP;
  359. CMD$ELMID[0] = ELMLST"CUPLR";
  360. END
  361.  
  362. ELSE
  363.  
  364. BEGIN # MUST BE NPU #
  365. CMD$PFC[0] = NPS;
  366. CMD$SFC[0] = NP;
  367. CMD$ELMID[0] = ELMLST"NPU";
  368. END
  369. END
  370.  
  371. ELSE IF PAR$PCHR2[BEGSYIX] EQ "R" # TRUNK #
  372. THEN
  373.  
  374. BEGIN
  375. CMD$PFC[0] = TRS;
  376. CMD$SFC[0] = TR;
  377. CMD$ELMID[0] = ELMLST"TRUNK";
  378. END
  379.  
  380. ELSE IF PAR$PCHR2[BEGSYIX] EQ "L" # LOGICAL LINK #
  381. THEN
  382.  
  383. BEGIN
  384. CMD$PFC[0] = LLS;
  385. CMD$SFC[0] = LL;
  386. CMD$ELMID[0] = ELMLST"LLINK";
  387. END
  388.  
  389. ELSE IF PAR$PCHR2[BEGSYIX] EQ "C" # SVC #
  390. THEN
  391.  
  392. BEGIN
  393. CMD$PFC[0] = VCS;
  394. CMD$SFC[0] = VC;
  395. CMD$ELMID[0] = ELMLST"SVC";
  396. END
  397.  
  398.  
  399. ELSE
  400.  
  401. BEGIN
  402. MESSAGE(BADRCMD[0],0);
  403. ABORT;
  404. END;
  405.  
  406.  
  407. #
  408. * THE ELEMENT TYPE BEING STATUSED MAY BE A MUTIPLE TYPE (I.E A
  409. * STATUS OF TERMINALS ON A LINE (ST,TES,LI=XXXXXXX)). IF SO,
  410. * THE THIRD CHARACTER OF THE PARAMETER CODE WILL ALWAYS BE "S".
  411. * IF TRUE, THEN THE QUALIFIER ELEMENT (I.E. LI=XXXXXXX) HAS TO
  412. * BE DETERMINED AND THE SFC ADJUSTED. ALSO THE CMD TYPE MUST
  413. * BE CHANGED TO INDICATE A MULTIPLE TYPE.
  414. * THE ELEMENT IDENTIFIER SET TO THIS POINT IS FOR THE SINGLE
  415. * ELEMENT TYPE OF THE COMMAND. IF MULTIPLE, SIMPLY BUMP THE
  416. * VALUE BY 1 AND THE PROPER ID VALUE IS SET. NOTE THE ORDER OF
  417. * THE ID VALUES IN THE STATUS LIST ELMLST.
  418. * NOTE THAT THE ASSUMPTION THAT THE QUALIFIER ELEMENT PARAMETER
  419. * WORD FOLLOWS THE STATUSED ELEMENT PARAMETER WORD OF THE
  420. * SYNTAX PARAMETER LIST.
  421. #
  422.  
  423. QELIDX = BEGSYIX ; # BUMP PARAMETER WORD INDEX #
  424.  
  425. IF PAR$PCHR3[QELIDX] EQ "S"
  426. THEN
  427. BEGIN
  428. QELIDX = QELIDX + 1; # BUMP TO QUALIFIER ELM #
  429.  
  430. CMD$TYPE[0] = CMDLST"MULTIPLE";
  431. CMD$ELMID[0] = CMD$ELMID[0] + 1;
  432.  
  433.  
  434. IF PAR$PCHR2[QELIDX] EQ "I" # LI= QUALIFIER #
  435. THEN
  436. CMD$SFC[0] = LI;
  437.  
  438. ELSE IF PAR$PCHR2[QELIDX] EQ "P" # NP= QUALIFIER #
  439. THEN
  440. CMD$SFC[0] = NP;
  441.  
  442. ELSE IF PAR$PCHR2[QELIDX] EQ "L" # LL= QUALIFIER #
  443. THEN
  444. CMD$SFC[0] = LL;
  445.  
  446. END
  447.  
  448. #
  449. * CHECK IF A STATUS OF ALL TERMINALS ON A HOST TO HOST LOGICAL
  450. * LINK HAS BEEN ATTEMPTED. IF SO, SEND ERROR MESSAGE TO OPERATOR,
  451. * THEN EXIT PROCESS. OTHERWISE, CHECK THAT THE NPU NODE ID OF
  452. * THE NPU ORDINAL DOES IN FACT MATCH THE NPU NODE ID OF THE
  453. * ASSOCIATED LOGICAL LINK ADDRESS. IF NOT, DELETE THE NPU
  454. * ORDINAL AND LLA FROM THE ADDRESS PARAMETER LIST OF THE COMMAND.
  455. #
  456.  
  457. IF CMD$ELMID[0] EQ ELMLST"TERMS"
  458. AND CMD$SFC[0] EQ LL
  459. THEN
  460.  
  461. BEGIN
  462. NORIDX = ELMIDX + 2; # SET NOR INDEX #
  463.  
  464. #
  465. * FOR EACH POSSIBLE NPU ORDINAL SPECIFIED ( MAX IS 2)
  466. #
  467.  
  468.  
  469. FOR K = 0 STEP 1 UNTIL 1
  470. DO
  471.  
  472. BEGIN
  473. LLI$WORD[K] = 0; # CLEAR LLINK INFO WORD #
  474.  
  475. #
  476. * SEARCH THE ADDRESS PARAMETER LIST FOR A NOR PARAMETER.
  477. #
  478.  
  479. FOR L = BEGAPIX STEP 1 UNTIL FINAPIX
  480. DO
  481.  
  482. BEGIN
  483. IF PAR$PCODE[L] EQ "NOR"
  484. THEN
  485.  
  486. BEGIN
  487. LLI$LLAIX[K] = L + 1; # SET LLA INDEX FOR NOR #
  488. LLI$NORIX[K] = L; # SET NOR INDEX #
  489. LLI$NPORD[K] = PAR$ORD[L]; # SET NPU ORDINAL #
  490.  
  491. #
  492. * CHECK THE LINK TYPE FOR HOST TO HOST. IF SO, SEND MESSAGE AND
  493. * EXIT THE PROCESS.
  494. #
  495.  
  496. IF PAR$LLTYPE[LLI$LLAIX[K]]
  497. THEN
  498.  
  499. BEGIN
  500. WCB$WC[1] = 8 ; # SET MSG ENTRY SIZE #
  501. ABHTLC[1] = 60; # SET MSG CHARACTER LEN #
  502. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],HHMSG[0]);
  503. GOTO ENDEXIT;
  504. END
  505.  
  506. ELSE # LOGICAL LINK HOST TO NPU #
  507.  
  508. BEGIN
  509.  
  510. #
  511. * CHECK TO SEE IF UNMATCHED NPU NODE ID OF NPU AT NOR ORDINAL AND
  512. * NPU NODE ID OF LOGICAL LINK ADDRESS IS PRESENT. IF SO, A RESULT-
  513. * ING STATUS REQUEST CAN NOT BE SENT TO THAT NPU SINCE IT IS NOT
  514. * THE TERMINAL NODE OF THE LINK. THEREFORE, DELETE THE NPU ORDINAL
  515. * PARAMETER AS WELL AS THE LOGICAL LINK ADDRESS PARAMETER WORD.
  516. #
  517.  
  518. IF PAR$LLNID2[LLI$LLAIX[K]] NQ NPU$NID[LLI$NPORD[K]]
  519. THEN
  520.  
  521. BEGIN
  522. PAR$PCODE[LLI$NORIX[K]] = "NUL";
  523. PAR$PCODE[LLI$LLAIX[K]] = "NUL";
  524. LLI$NORIX[K] = 0;
  525. END
  526.  
  527. END # IF PAR$LLTYPE #
  528.  
  529. END # IF PAR$PCODE EQ NOR #
  530.  
  531. END # FOR L=BEGAPIX LOOP #
  532.  
  533. END # FOR K = 0 LOOP #
  534.  
  535. #
  536. * IF THERE IS NOT AN NOR PARAMETER WORD PRESENT IN THE COMMAND
  537. * AFTER THE PREVIOUS ACTIONS, THEN CS IS NOT SUPERVISING THE
  538. * TERMINAL NODE OF THE LOGICAL LINK QUALIFIER ELEMENT. A
  539. * MESSAGE IS SENT TO THE OPERATOR.
  540. #
  541.  
  542. IF (LLI$NORIX[0] EQ 0
  543. AND LLI$NORIX[1] EQ 0)
  544. THEN
  545.  
  546. BEGIN
  547. NO$NAME[0] = PAR$ELNAME[BEGSYIX + 1]; # SET NPU NAME #
  548. WCB$WC[1] = 7; # SET MSG ENTRY SIZE #
  549. ABHTLC[1] = 50; # SET MSG CHAR LENGTH #
  550. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],NOSUPM[0]);
  551. GOTO ENDEXIT;
  552. END
  553.  
  554. END # IF CMD$ELMID #
  555.  
  556. OC$NCNT[OCBORD] = 0; # CLEAR AFFECTED NPU COUNT #
  557.  
  558. #
  559. * FOR EACH NPU ORDINAL IN COMMAND (MAX IS TWO), CHECK TO SEE IF
  560. * THE NPU IS BUSY WITH ANOTHER STATUS COMMAND. IF SO, INFORM THE
  561. * REQUESTING OPERATOR AND EXIT. OTHERWISE, CONTINUE PROCESSING
  562. * THE CURRENT STATUS COMMAND.
  563. #
  564.  
  565. SENT = FALSE;
  566.  
  567. FOR I = BEGAPIX STEP 1 UNTIL FINAPIX
  568. DO
  569.  
  570. BEGIN
  571. IF PAR$PCODE[I] EQ "NOR" OR
  572. NPSFLAG
  573. THEN
  574.  
  575. BEGIN
  576. NPUORD = PAR$ORD[I]; # SET LOCAL NPU ORDINAL #
  577.  
  578.  
  579. #
  580. * IF THE COMMAND TYPE IS MULTIPLE, THEN THE STATUS DESIRED FOR
  581. * THE STATUSED ELEMENT GROUP MUST BE DETERMINED. A SEARCH OF THE
  582. * SYNTAX PARAMETER LIST FOR THE ELEMENT STATUS QUALIFIER IS DONE.
  583. * THE COMMAND STATUS QUALIFIER IS THEN SET ACCORDINGLY.
  584. #
  585.  
  586. IF CMD$TYPE[0] EQ CMDLST"MULTIPLE"
  587. THEN
  588.  
  589. BEGIN
  590. CMD$STATUS[0] = STATLST"ALL";
  591. DONE = FALSE;
  592.  
  593. FOR M = BEGSYIX STEP 1 WHILE (M LQ FINSYIX
  594. AND CMD$STATUS[0] EQ STATLST"ALL"
  595. AND NOT DONE)
  596. DO
  597.  
  598. BEGIN
  599.  
  600. IF PAR$PCODE[M] EQ "EN1" # ENABLED ELEMENTS #
  601. THEN
  602.  
  603. CMD$STATUS[0] = STATLST"EN";
  604.  
  605. ELSE IF PAR$PCODE[M] EQ "AC0" # ACTIVE ELEMENTS #
  606. THEN
  607.  
  608. CMD$STATUS[0] = STATLST"ACT";
  609.  
  610. ELSE IF PAR$PCODE[M] EQ "DI1" # DISABLED ELEMENTS #
  611. THEN
  612.  
  613. CMD$STATUS[0] = STATLST"DI";
  614.  
  615. ELSE IF PAR$PCODE[M] EQ "DN0" # DOWNED ELEMENTS #
  616. THEN
  617.  
  618. CMD$STATUS[0] = STATLST"DN";
  619.  
  620. ELSE IF PAR$PCODE[M] EQ "MSG"
  621. THEN
  622.  
  623. DONE = TRUE;
  624.  
  625.  
  626. END # FOR M LOOP #
  627.  
  628. END # IF CMD$TYPE #
  629.  
  630. #
  631. * INITIALIZE THE OUTGOING SM MEMORY AREAS.
  632. #
  633.  
  634. ABHABT[1] = APPSUP; # ABH BLOCK TYPE #
  635. ABHBT[1] = APPSUP;
  636. ABHACT[1] = ACTCSNP$; # SET ACT FOR OUTGOING SM #
  637.  
  638. #
  639. * BASED ON THE DETERMINED COMMAND ELEMENT IDENTIFIER, BRANCH TO
  640. * THE APPROPRIATE CASE AND BUILD THE OUTGOING SM.
  641. #
  642.  
  643. GOTO BLDSM[CMD$ELMID[0]];
  644.  
  645.  
  646.  
  647. BLDTERM: # ST,TE=XXXXXXX COMMAND #
  648.  
  649. #
  650. * CONVERT THE DISPLAY CODED TERMINAL NAME TO ASCII.
  651. #
  652.  
  653. DORD = ELMIDX;
  654. DBIT = 0;
  655. AORD = 1;
  656. ABIT = 4;
  657. FOR Y = 1 STEP 1 UNTIL 7
  658. DO
  659.  
  660. BEGIN
  661. SSBEBF(PARMS[0],DORD,DBIT,6,SINGCHR);
  662. SINGCHR = SSDCDA(SINGCHR);
  663. SSBSBF(CSSM[1],AORD,ABIT,8,SINGCHR);
  664. END
  665.  
  666. #
  667. * SET UP REST OF TES/TE SM
  668. #
  669.  
  670. ABHTLC[1] = NTESTE;
  671. TESP[1] = PAR$ELADDR[I+1]; # ADD PORT NUMBER #
  672. WCB$WC[1] = LTESTE + 2;
  673. WCB$SMID[1] = SMID"TESTE";
  674. GOTO SENDSM;
  675.  
  676.  
  677.  
  678. BLDTERMS: # ST,TES,YY=XXXXXXX COMMAND #
  679.  
  680. #
  681. * THE MULTIPLE TES STATUS COMMAND MAY BE REQUESTED WITH THE NP, LL
  682. * OR LI QUALIFIER ELEMENTS (NPU,LOGICAL LINK, LINE). THE GENERATED
  683. * SM DIFFERS SLIGHTLY FOR EACH VARIATION. DETERMINE THE QUALIFIER
  684. * AND SET UP THE APPROPRIATE SM.
  685. #
  686.  
  687. IF CMD$SFC[0] EQ NP # NPU QUALIFIER ELEMENT #
  688. THEN
  689.  
  690. BEGIN
  691. TESSTL[1] = CMD$STATUS[0]; # SET STATUS DESIRED#
  692. ABHTLC[1] = NTESNP;
  693. WCB$WC[1] = LTESNP + 2;
  694. WCB$SMID[1] = SMID"TESNP";
  695. END
  696.  
  697. ELSE IF CMD$SFC[0] EQ LL # LLINK QUALIFIER ELEMENT #
  698. THEN
  699.  
  700. BEGIN
  701. TESN1[1] = PAR$LLNID1[I+1];
  702. TESN2[1] = PAR$LLNID2[I+1];
  703. ABHTLC[1] = NTESLL;
  704. WCB$WC[1] = LTESLL + 2;
  705. WCB$SMID[1] = SMID"TESLL";
  706. END
  707.  
  708. ELSE # LINE QUALIFIER ELEMENT #
  709.  
  710. BEGIN
  711. TESP[1] = PAR$ELADDR[I+1];
  712. ABHTLC[1] = NTESLI;
  713. WCB$WC[1] = LTESLI + 2;
  714. WCB$SMID[1] = SMID"TESLI";
  715. END
  716.  
  717. TESST[1] = CMD$STATUS[0];
  718. GOTO SENDSM;
  719.  
  720.  
  721.  
  722.  
  723. BLDLINE: # ST,LI=XXXXXXX COMMAND #
  724.  
  725. LISP[1] = PAR$ELADDR[I+1];
  726. ABHTLC[1] = NLISLI;
  727. WCB$WC[1] = LLIS + 2;
  728. WCB$SMID[1] = SMID"LISLI";
  729. GOTO SENDSM;
  730.  
  731.  
  732.  
  733. BLDLINES: # ST,LIS,YY=XXXXXXX COMMAND #
  734.  
  735. LISST[1] = CMD$STATUS[0];
  736. ABHTLC[1] = NLISNP;
  737. WCB$WC[1] = LLIS + 2;
  738. WCB$SMID[1] = SMID"LISNP";
  739. GOTO SENDSM;
  740.  
  741.  
  742.  
  743. BLDCUPLR: # ST,CP=XXXXXXX COMMAND #
  744.  
  745. CPSN1[1] = PAR$ELADDR[I+1];
  746. ABHTLC[1] = NCPS;
  747. WCB$WC[1] = LCPS + 2;
  748. WCB$SMID[1] = SMID"CPSCP";
  749. GOTO SENDSM;
  750.  
  751.  
  752.  
  753. BLDCUPLRS: # ST,CPS,NP=XXXXXXX COMMAND #
  754.  
  755. CPSST[1] = CMD$STATUS[0];
  756. ABHTLC[1] = NCPS;
  757. WCB$WC[1] = LCPS + 2;
  758. WCB$SMID[1] = SMID"CPSNP";
  759. GOTO SENDSM;
  760.  
  761.  
  762.  
  763.  
  764. BLDTRUNK: # ST,TR=XXXXXXX COMMAND #
  765.  
  766. TRSP[1] = PAR$ELADDR[I+1];
  767. ABHTLC[1] = NTRSTR;
  768. WCB$WC[1] = LTRS + 2;
  769. WCB$SMID[1] = SMID"TRSTR";
  770. GOTO SENDSM;
  771.  
  772.  
  773.  
  774. BLDTRUNKS: # ST,TRS,NP=XXXXXXX COMMAND #
  775.  
  776.  
  777. TRSST[1] = CMD$STATUS[0];
  778. ABHTLC[1] = NTRSNP;
  779. WCB$WC[1] = LTRS + 2;
  780. WCB$SMID[1] = SMID"TRSNP";
  781. GOTO SENDSM;
  782.  
  783.  
  784.  
  785. BLDNPU: # ST,NP=XXXXXXX COMMAND #
  786.  
  787. ABHTLC[1] = NNPS;
  788. WCB$WC[1] = LNPS + 2;
  789. WCB$SMID[1] = SMID"NPSNP";
  790. GOTO SENDSM;
  791.  
  792.  
  793.  
  794.  
  795. BLDLLINK: # ST,LL=XXXXXXX COMMAND #
  796.  
  797. LLSN1[1] = PAR$LLNID1[I+1];
  798. LLSN2[1] = PAR$LLNID2[I+1];
  799. ABHTLC[1] = NLLSLL;
  800. WCB$WC[1] = LLLS + 2;
  801. WCB$SMID[1] = SMID"LLSLL";
  802. GOTO SENDSM;
  803.  
  804.  
  805.  
  806.  
  807. BLDLLINKS: # ST,LLS,NP=XXXXXXX COMMAND #
  808.  
  809. LLSST[1] = CMD$STATUS[0];
  810. ABHTLC[1] = NLLSNP;
  811. WCB$WC[1] = LLLS + 2;
  812. WCB$SMID[1] = SMID"LLSNP";
  813. GOTO SENDSM;
  814.  
  815.  
  816. BLDSVC: # ST,SVC=XXXXX COMMAND #
  817.  
  818. #
  819.   CONVERT THE DISPLAY CODE ARCHETYPE NAME TO ASCII
  820. #
  821. DORD = ELMIDX; # BITFIELD START POSITION #
  822. DBIT = 0;
  823. AORD = 1;
  824. ABIT = 4;
  825. FOR Y = 1 STEP 1 UNTIL 5
  826. DO
  827.  
  828. BEGIN
  829. SSBEBF(PARMS[0],DORD,DBIT,6,SINGCHR); # EXTRACT BITFIELD #
  830. SINGCHR = SSDCDA(SINGCHR);
  831. SSBSBF(CSSM[1],AORD,ABIT,8,SINGCHR); # STORE BITFIELD #
  832. END
  833.  
  834. #
  835.   SET UP REST OF VCS/VC SM
  836. #
  837.  
  838. VCSP[1] = PAR$ELADDR[I+1]; # PORT NUMBER #
  839. VCSSP[1] = 0; # SUBPORT ALWAYS 0 #
  840. VCSBL[1] = X"2020"; # INSERT TWO BLANKS #
  841. ABHTLC[1] = NVCSVC; # LENGTH IN CHAR #
  842. WCB$WC[1] = LVCSVC + 2;
  843. WCB$SMID[1] = SMID"VCSVC";
  844. GOTO SENDSM;
  845.  
  846.  
  847.  
  848. BLDSVCS: # ST,SVS,YY=XXXXXXX COMMAND #
  849.  
  850. #
  851. * THE MULTIPLE SVC STATUS COMMAND MAY BE REQUESTED WITH
  852. * THE NP OR LI QUALIFIER ELEMENT. THE GENERATED SM
  853. * DIFFERS SLIGHTLY FOR EACH VARIATION. DETERMINE QUALIFIER
  854. * AND SET UP APPROPRIATE SM.
  855. #
  856.  
  857. IF CMD$SFC[0] EQ NP # NPU QUALIFIER ELEMENT #
  858. THEN
  859.  
  860. BEGIN
  861. ABHTLC[1] = NVCSNP; # LENGTH IN CHAR #
  862. WCB$WC[1] = LVCSNP + 2;
  863. WCB$SMID[1] = SMID"VCSNP";
  864. END
  865.  
  866. ELSE # LINE QUALIFIER ELEMENT #
  867.  
  868. BEGIN
  869. VCSP[1] = PAR$ELADDR[I+1]; # PORT NUMBER #
  870. VCSSP[1] = 0; # SUBPORT ALWAYS 0 #
  871. ABHTLC[1] = NVCSLI; # LENGTH IN CHAR #
  872. WCB$WC[1] = LVCSLI + 2;
  873. WCB$SMID[1] = SMID"VCSLI";
  874. END
  875.  
  876. GOTO SENDSM;
  877.  
  878.  
  879. SENDSM:
  880.  
  881. #
  882. * SET THE PFC AND SFC OF THE OUTGOING SM.
  883. #
  884.  
  885. PFC[1] = CMD$PFC[0];
  886. SFC[1] = CMD$SFC[0];
  887.  
  888. #
  889. * IF THIS STATUS REQUEST GOES TO ALL NPUS, FOR EACH SUPERVISED NPU
  890. * SET THE STATUS REQUEST PENDING FLAG FOR THIS OPERATOR AND INCRE-
  891. * MENT THE AFFECTED NPU COUNT, AND SAVE THE NPU ORDINAL. FIND THE
  892. * FIRST NPU THAT IS NOT BUSY WITH A STATUS REQUEST.
  893. #
  894.  
  895. P<FLG$WORD> = LOC(NPU$STFLGS[0]);
  896. IF NPSFLAG
  897. THEN
  898. BEGIN
  899.  
  900. FOR Y=0 STEP 1 WHILE Y LS CSNPCNT
  901. DO
  902. BEGIN
  903. IF NPU$STAT[Y] EQ SUPSTAT"SUP"
  904. THEN
  905. BEGIN
  906. SSBSBW(FLG$WORD[Y],OCBORD);
  907. OC$NCNT[OCBORD] = OC$NCNT[OCBORD] + 1;
  908. NPUORD = Y;
  909. END
  910. END
  911.  
  912. MATCH = FALSE;
  913. FOR Y=0 STEP 1 WHILE NOT MATCH AND
  914. Y LS CSNPCNT
  915. DO
  916. BEGIN
  917. IF NPU$STAT[Y] EQ SUPSTAT"SUP" AND
  918. NPU$OPST[Y] EQ 0
  919. THEN
  920. BEGIN
  921. MATCH = TRUE;
  922. NPUORD = Y;
  923. END
  924. END
  925. END
  926.  
  927. #
  928. * STATUS REQUEST IS JUST TO ONE NPU. SET THE STATUS REQUEST PENDING
  929. * FLAG IN THE NPU AND INCREMENT THE AFFECTED NPU COUNT.
  930. #
  931.  
  932. ELSE
  933. BEGIN
  934. SSBSBW(FLG$WORD[NPUORD],OCBORD);
  935. OC$NCNT[OCBORD] = OC$NCNT[OCBORD] + 1;
  936. END
  937.  
  938. #
  939. * IF THE NPU IS NOT BUSY AND THIS IS THE FIRST NPU THEN, SET THE
  940. * NPUORD IN THE OCB, SAVE THE CURRENT STATUS OPERATOR ORD IN THE
  941. * NPUCB, AND SEND THE SM.
  942. #
  943.  
  944. IF NPU$OPST[NPUORD] EQ 0 AND
  945. NOT SENT
  946. THEN
  947. BEGIN
  948. OC$CNPU[OCBORD] = NPUORD;
  949. NPU$OPST[NPUORD] = OCBORD;
  950.  
  951. ABHDN[1] = NPU$NID[NPUORD];
  952. ABHSN[1] = NPU$HID[NPUORD];
  953. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  954. SENT = TRUE;
  955. END
  956.  
  957. END # IF PAR$PCODE EQ NOR #
  958.  
  959. END # FOR I = BEGAPIX LOOP #
  960.  
  961. ENDEXIT:
  962.  
  963.  
  964. #
  965. * IF AFFECTED NPU COUNT OF THE OCB IS ZERO, CAUSE A READY.. MSG
  966. * TO THE OPERATOR VIA A NULL TERMINAL TEXT ENTRY.
  967. #
  968.  
  969. IF OC$NCNT[OCBORD] EQ 0
  970. THEN
  971.  
  972. BEGIN
  973. WCB$WC[1] = 2;
  974. WCB$SMID[1] = SMID"TTEXT";
  975. ABHADR[1] = HDR$OPORD[0];
  976. WCB$IAF[1] = TRUE; # SET INPUT ALLOWED #
  977. ABHTLC[1] = 0;
  978. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
  979. END
  980.  
  981. ELSE
  982.  
  983. BEGIN
  984. OC$VERB[OCBORD] = HDR$VERB[0];
  985.  
  986. OC$WC[OCBORD] = WCB$WC[1] - 2;
  987. OC$TLC[OCBORD] = ABHTLC[1];
  988. MOVEI(OC$WC[OCBORD],LOC(CSSM[1]),LOC(OC$SM[OCBORD]));
  989. END
  990.  
  991.  
  992. $BEGIN
  993.  
  994. DBVAR = 1;
  995.  
  996. $END
  997.  
  998. END # CSSAST #
  999.  
  1000.  
  1001. TERM
cdc/nos2.source/nam5871/cssast.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator