User Tools

Site Tools


cdc:nos2.source:nam5871:cssaac

CSSAAC

Table Of Contents

  • [00006] PROC CSSAAC
  • [00007] CSSAAC - ACTION ALERT COMMAND.
  • [00011] ACTION ALERT COMMAND.
  • [00044] PROC CSUCDB
  • [00045] PROC SSTAQE

Source Code

CSSAAC.txt
  1. *DECK CSSAAC
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. USETEXT TXCMDCS
  6. PROC CSSAAC;
  7. # TITLE CSSAAC - ACTION ALERT COMMAND. #
  8.  
  9. BEGIN # CSSAAC #
  10. #
  11. ** CSSAAC - ACTION ALERT COMMAND.
  12. *
  13. * A. LIM 83/02/25
  14. *
  15. * THIS PROCEDURE ACTIONS THE ALERT COMMAND FROM THE HOP OR
  16. * THE CONTROLLING NOP.
  17. *
  18. * PROC CSSAAC
  19. *
  20. * ENTRY:
  21. * 1. HDRCMD[0] = COMMAND HEADER WORD.
  22. * 2. PARMS[0] = COMMAND BLOCK CONTAINING THE ORIGINAL
  23. * TYPEIN, SYNTAX PARAMETER LIST AND ADDRESS.
  24. *
  25. * EXIT:
  26. * 1. THE *CP* AND/OR *BU* VALUE(S) IN NPUCB(S) GOT UPDATED.
  27. *
  28. * NOTE:
  29. * THE ALERT COMMAND MAY CONTAIN:
  30. * 1. NO *CP* AND *BU*,
  31. * 2. EITHER *CP* OR *BU*, OR
  32. * 3. BOTH *CP* AND *BU*.
  33. *
  34. *
  35. #
  36.  
  37.  
  38. #
  39. **** PROC CSSAAC XREF LIST
  40. #
  41.  
  42. XREF
  43. BEGIN
  44. PROC CSUCDB; # CONVERT DC DECIMAL TO BINARY #
  45. PROC SSTAQE; # SS- ACCEPT A QUEUE ENTRY #
  46. END
  47.  
  48. #
  49. ****
  50. #
  51.  
  52.  
  53.  
  54.  
  55.  
  56. ITEM CPVALUE B; # SET IF VALID CP VALUE ENTERED #
  57. ITEM BUVALUE B; # SET IF VALID BU VALUE ENTERED #
  58. ITEM FPINDX U; # FIRST INDEX INTO SYNTAX PARM #
  59. ITEM LPINDX U; # LAST INDEX INTO SYNTAX PARM #
  60. ITEM B U; # TEMP FOR BINARY VALUE (CSUCDB)#
  61. ITEM D U; # TEMP FOR DECIM VALUE (CSUCDB) #
  62. ITEM ERROR B; # ERROR INDICATOR (CSUCDB) #
  63. ITEM CP U; # CPU UTILIZATION VALUE #
  64. ITEM BU U; # BUFFER AVAILABILITY VALUE #
  65. ITEM NPUS B; # ALERT ALL NPUS INDICATOR #
  66. ITEM DONE B; # LOOP EXIT VAR #
  67. ITEM I U; # LOOP INDICATION VAR #
  68. ITEM NPUORD U; # NPUCB ORDINAL #
  69.  
  70.  
  71. #
  72. * IVPBUF - INVALID PARAMETER BUFFER.
  73. #
  74. ARRAY IVPBUF[00:00] S(3);
  75. BEGIN
  76. ITEM IVP$MSG C(00,00,24) =
  77. ["INVALID PARAMETER VALUE."];
  78. ITEM IVP$ZRO U(02,24,36) = [0];
  79. END
  80.  
  81.  
  82.  
  83.  
  84.  
  85. CONTROL EJECT;
  86. #
  87. * INITIALIZE BUFFERS, INDICES, VARIABLES AND FLAGS.
  88. #
  89.  
  90. ABHWORD[1] = 0;
  91. WCB$WORD[1] = 0;
  92.  
  93. FPINDX = HDR$TXWCNT[0] + 2;
  94. LPINDX = HDR$TXWCNT[0] + HDR$SPCNT[0] - 1;
  95.  
  96. CPVALUE = FALSE;
  97. BUVALUE = FALSE;
  98.  
  99. NPUS = TRUE;
  100. ERROR = FALSE;
  101. DONE = FALSE;
  102.  
  103. #
  104. * SEARCH THE PARAMETER LIST FOR *CP* AND *BU* VALUES.
  105. * CONVERT THE VALUES TO BINARY.
  106. * DETERMINE IF ALERT WERE FOR ALL NPUS OR JUST A SINGLE NPU.
  107. #
  108.  
  109. FOR I = FPINDX STEP 1 WHILE (I LQ LPINDX) AND (NOT ERROR)
  110. DO
  111. BEGIN
  112. IF PAR$PCODE[I] EQ "CP1"
  113. THEN
  114. BEGIN # CP VALUE SPECIFIED #
  115. CSUCDB(PAR$ELNAME[I],B,D,ERROR);
  116. IF (NOT ERROR)
  117. AND ((B GQ MINCP$) AND (B LQ MAXCP$))
  118. THEN
  119. BEGIN # NO ERROR, AND VALUE IN RANGE #
  120. CP = B;
  121. CPVALUE = TRUE;
  122. END
  123. ELSE
  124. BEGIN # ERR IN VALUE, OR NOT IN RANGE #
  125. ERROR = TRUE;
  126. END
  127. END
  128. ELSE IF PAR$PCODE[I] EQ "BU0"
  129. THEN
  130. BEGIN # BU VALUE SPECIFIED #
  131. CSUCDB(PAR$ELNAME[I],B,D,ERROR);
  132. IF (NOT ERROR)
  133. AND ((B GQ MINBU$) AND (B LQ MAXBU$))
  134. THEN
  135. BEGIN
  136. BU = B;
  137. BUVALUE = TRUE;
  138. END
  139. ELSE
  140. BEGIN
  141. ERROR = TRUE;
  142. END
  143. END
  144. ELSE IF PAR$PCODE[I] EQ "NP0"
  145. THEN
  146. BEGIN # ALERT FOR A SINGLE NPU #
  147. NPUS = FALSE;
  148. NPUORD = PAR$ORD[LPINDX+1]; # SAVE NPU ORDINAL #
  149. END
  150. END
  151.  
  152. IF (NOT ERROR)
  153. AND (CPVALUE OR BUVALUE)
  154. THEN # NO ERROR #
  155. BEGIN # AND ONE OR MORE VALUES SPECIFIED #
  156. IF NPUS
  157. THEN
  158. BEGIN # ALERT ALL NPUS #
  159. NPUORD = 0;
  160. END
  161. FOR I = NPUORD STEP 1 WHILE (NOT DONE)
  162. AND (I LS CSNPCNT)
  163.  
  164. DO
  165. BEGIN
  166. IF CPVALUE
  167. THEN
  168. NPU$CP[I] = CP;
  169. IF BUVALUE
  170. THEN
  171. NPU$BU[I] = BU;
  172. IF NOT NPUS
  173. THEN
  174. DONE = TRUE;
  175. END
  176. END
  177. ELSE IF ERROR # ERROR IN SPECIFIED VALUE #
  178. THEN
  179. BEGIN
  180. ABHADR[1] = HDR$OPORD[0];
  181. WCB$SMID[1] = SMID"TTEXT";
  182. WCB$WC[1] = 3 + 2;
  183. SSTAQE(P<CNQ>, WCBUF[1], ABH[1], IVPBUF[0]);
  184. END
  185.  
  186. #
  187. * SEND A NULL TERMINAL TEXT TO C-LAYER TO CLEAR THE PIPELINE.
  188. #
  189.  
  190. ABHWORD[1] = 0;
  191. WCB$WORD[1] = 0;
  192.  
  193. ABHADR[1] = HDR$OPORD[0];
  194. WCB$SMID[1] = SMID"TTEXT";
  195. WCB$WC[1] = 2;
  196. WCB$IAF[1] = TRUE;
  197. SSTAQE(P<CNQ>, WCBUF[1], ABH[1], MSGBUF[0]);
  198.  
  199. END # CSSAAC #
  200.  
  201. TERM
cdc/nos2.source/nam5871/cssaac.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator