User Tools

Site Tools


cdc:nos2.source:nam5871:nvfsnof

NVFSNOF

Table Of Contents

  • [00009] PROC NVFSNOF
  • [00010] NVFSNOF - APPL NETOFF/FAIL REQUEST (NET/OFF OR FAIL/APPL SM)
  • [00013] APPL NETOFF/FAIL REQUEST (NET/OFF OR FAIL/APPL SM).
  • [00043] PROC ABORT
  • [00049] PROC NETOFF
  • [00050] PROC NVFSIAM
  • [00051] PROC SSBSBF
  • [00052] PROC SSTAQE
  • [00053] PROC NVFUMQE

Source Code

NVFSNOF.txt
  1. *DECK NVFSNOF
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7. USETEXT TXTSUSS
  8.  
  9. PROC NVFSNOF;
  10. # TITLE NVFSNOF - APPL NETOFF/FAIL REQUEST (NET/OFF OR FAIL/APPL SM) #
  11. BEGIN # NVFSNOF #
  12. #
  13. ** NVFSNOF - APPL NETOFF/FAIL REQUEST (NET/OFF OR FAIL/APPL SM).
  14. *
  15. * E. THAVIKULWAT 81/12/31
  16. *
  17. * THIS PROCEDURE PROCESSES THE NET/OFF OR FAIL/APPL REQUEST. IT IS
  18. * CALLED INTO EXECUTION BY PROCEDURE *NVFSDQE*.
  19. *
  20. * PROC NVFSNOF
  21. *
  22. * ENTRY:
  23. * NET/ON OR FAIL/APPL SM IN *MSGBUF*
  24. *
  25. * EXIT:
  26. * TERMINATING APPLICATION'S AST ENTRY SET TO INITIAL CONDITION.
  27. *
  28. * METHOD:
  29. * SEARCH *AST* TABLE FOR A MATCH ON APPLICATION NUMBER. SEND
  30. * APPROPRIATE UNSOLICITED STATUS MESSAGE TO *USQ* QUEUE. CLEAN
  31. * UP APPLICATION'S *AST* ENTRY. SEND FAI/APP/N TO <AAINPQ> SO
  32. * THAT THE PAAC ENTRIES CAN BE CLEANED UP. IF IDLE/DISABLE HOST
  33. * HAS BEEN INITIATED AND ALL APPLICATIONS HAVE TERMINATED, ISSUE
  34. * NETOFF TO TERMINATE NVF.
  35. #
  36.  
  37. #
  38. **** PROC NVFSNOF - XREF LIST.
  39. #
  40. $BEGIN
  41. XREF
  42. BEGIN
  43. PROC ABORT; # ABORT JOB #
  44. END
  45. $END
  46.  
  47. XREF
  48. BEGIN
  49. PROC NETOFF; # TERMINATE NVF #
  50. PROC NVFSIAM; # ISSUE APPL. STATUS ACCOUNTING MESSAGE #
  51. PROC SSBSBF;
  52. PROC SSTAQE; # ALLOCATE QUEUE ENTRY #
  53. PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
  54. END
  55.  
  56. #
  57. ****
  58. #
  59.  
  60. *CALL SMSGNVF
  61.  
  62. ITEM ANUM I; # APPLICATION NUMBER #
  63. ITEM AS I; # SUBSCRIPT FOR ARRAY AST #
  64. ITEM CNST1 I; # CONSTANT ---> 1 #
  65. ITEM CNST2 I; # CONSTANT ---> 2 #
  66. ITEM CNST3 I; # CONSTANT ---> 3 #
  67. ITEM I I; # LOOP VARIABLE #
  68. ITEM MATCH B; # EXIT LOOP VARIABLE #
  69. ITEM MTYP I; # MESSAGE TYPE #
  70. ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
  71.  
  72. $BEGIN
  73. #
  74. * THE FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO NIP'S DAYFILE
  75. * UPON NOT FINDING THE TERMINATING APPLICATION IN THE *AST* TABLE.
  76. #
  77. ARRAY UNAMSG[00:00] S(6);
  78. BEGIN
  79. ITEM UNA$PFCSFC U(00,0,16) = [HOPLG];
  80. ITEM UNA$MSG1 C(01,00,20) = ["UNKNOWN APPLICATION "];
  81. ITEM UNA$MSG2 C(03,00,22) = ["ATTEMPTING TERMINATION"];
  82. END
  83.  
  84. $END
  85.  
  86. #
  87. * DETERMINE NET/OFF OR FAIL/APPL AND GET THE APPLICATION NUMBER.
  88. #
  89. ANUM = NETAN[0]; # PRESET TO NET/OFF APPL NUMBER #
  90. IF (PFCSFC[0] EQ FAIAPP)
  91. THEN # FAIL/APPL SM #
  92. BEGIN
  93. ANUM = FAILAN[0]; # FAIL/APPL APPLICATION NUMBER #
  94. END
  95. #
  96. * SEARCH *AST* TABLE FOR ENTRY THAT MATCHES THE APPLICATION NUMBER.
  97. #
  98. MATCH = FALSE;
  99. NENTRY = ASTLNGTH / ASTSIZ$; # CALCULATE NUMBER OF ENTRIES #
  100. FOR I = 0 STEP 1 WHILE (NOT MATCH AND I LS NENTRY)
  101. DO
  102. BEGIN
  103. IF (AST$AN[I] EQ ANUM)
  104. THEN
  105. BEGIN
  106. #
  107. * APPLICATION FOUND IN *AST* TABLE. DETERMINE IF NET/OFF OR
  108. * FAIL/APPL AND SEND APPROPRIATE UNSOLICITED STATUS MESSAGE
  109. * TO *USQ* QUEUE.
  110. #
  111. AS = I; # SAVE SUBSCRIPT TO AST TABLE #
  112. MTYP = APMSG; # PRESET TO NO HOP ALERT #
  113. CNST1 = 1;
  114. CNST2 = 12;
  115. CNST3 = 60;
  116. SSBSBF(ASMBUF,CNST1,CNST2,CNST3,"NETTED OFF");
  117.  
  118. IF (PFCSFC[0] EQ FAIAPP)
  119. THEN
  120. BEGIN
  121. #
  122. * FAIL/APPL REQUEST. IF FAILED APPLICATION IS EITHER *CS*
  123. * OR *NS*, HOP ALERT FLAG MUST BE SET FOR THE MESSAGE.
  124. #
  125. CNST1 = 1;
  126. CNST2 = 12;
  127. CNST3 = 60;
  128. SSBSBF(ASMBUF,CNST1,CNST2,CNST3,"FAILED ");
  129.  
  130. IF (AST$ANAM[AS] EQ "CS") OR (AST$ANAM[AS] EQ "NS")
  131. THEN
  132. BEGIN
  133. MTYP = 6; # SET HOP ALERT FLAG FOR MSG #
  134. END
  135. END
  136.  
  137. CNST1 = 2;
  138. CNST2 = 30;
  139. CNST3 = 42;
  140. SSBSBF(ASMBUF,CNST1,CNST2,CNST3,B<0,42>AST$ANAM[AS]);
  141.  
  142. NVFUMQE(P<USQ>,ASMBUF[0],MTYP,0,LMSH40$); # MSG TO QUEUE #
  143. MATCH = TRUE;
  144. END
  145. END
  146.  
  147. #
  148. * IF APPLICATION NOT FOUND IN THE *AST* TABLE
  149. * IGNORE SM AND PROCEED TO DETERMINE IF NVF SHOULD BE TERMINATED.
  150. #
  151. IF (NOT MATCH)
  152. THEN
  153. BEGIN # APPLICATION NOT FOUND #
  154.  
  155. $BEGIN # ABORT IN DEBUG MODE #
  156. NVFUMQE(P<OTQ>,UNAMSG[0],APPCMD,0,6); # SM TO QUEUE #
  157.  
  158. $END
  159.  
  160. END
  161. ELSE
  162. BEGIN # APPLICATION FOUND #
  163. #
  164. * CLEAR APPROPRIATE FIELDS OF APPLICATION'S *AST* ENTRY. MARK
  165. * APPL DOWN UNTIL NET/OFF/N OR FAIL/APPL/N CAN BE SENT.
  166. #
  167. AST$AAL[AS] = 0;
  168. AST$MCN[AS] = 0;
  169. AST$DNF[AS] = TRUE;
  170. #
  171. * ISSUE THE APPROPRIATE APPLICATION STATUS ACCOUNTING MESSAGE
  172. * (EITHER SANW OR SENW). SEND NET/OFF/N OR FAIL/APPL/N.
  173. #
  174. IF (PFCSFC[0] EQ FAIAPP)
  175. THEN
  176. BEGIN
  177. NVFSIAM(AS,SANW$); # ISSUE SANW ACCOUNTING MESSAGE #
  178. AST$AFN[AS] = TRUE;
  179. END
  180. ELSE
  181. BEGIN
  182. NVFSIAM(AS,SENW$); # ISSUE SENW ACCOUNTING MESSAGE #
  183. AST$NON[AS] = TRUE;
  184. END
  185.  
  186. #
  187. * SEND FAI/APP/N TO <AAINPQ> SO THAT THE PAAC ENTRIES ASSOCIATED
  188. * WITH THIS APPL CAN BE DELETED. THIS IS JUST A *DUMMY*
  189. * FAI/APP/N. THE REAL THING (NET/OFF/N OR FAI/APP/N) WILL BE
  190. * SENT TO NIP IN NVFSCAD.
  191. #
  192. SPMSG0[0] = 0;
  193. WCB$SMID[0] = CTQSTAT"SFAI";
  194. WCB$WC[0] = LAPPF + 2;
  195. ABHABT[0] = APPCMD;
  196. PFCSFC[0] = FAIAPPN;
  197. FAILAN[0] = AST$AN[AS];
  198. SSTAQE(P<AAINPQ>,WCBUF[0],ABHBUF[0],APSM[0]);
  199. END
  200.  
  201. END # END NVFSNOF #
  202.  
  203. TERM
cdc/nos2.source/nam5871/nvfsnof.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator