User Tools

Site Tools


cdc:nos2.source:nam5871:nvfscad

NVFSCAD

Table Of Contents

  • [00007] PROC NVFSCAD( AS )
  • [00008] NVFSCAD - COMPLETE APPLICATION DEPARTURE.
  • [00012] COMPLETE APPLICATION DEPARTURE.
  • [00042] PROC ABORT
  • [00043] PROC NVFUMQE
  • [00044] PROC SSSAWR
  • [00045] PROC SSTRTS

Source Code

NVFSCAD.txt
  1. *DECK NVFSCAD
  2. USETEXT TEXTNVF
  3. USETEXT TXINNVF
  4. USETEXT TXSMNVF
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7. PROC NVFSCAD( AS );
  8. # TITLE NVFSCAD - COMPLETE APPLICATION DEPARTURE. #
  9.  
  10. BEGIN # NVFSCAD #
  11. #
  12. ** NVFSCAD - COMPLETE APPLICATION DEPARTURE.
  13. *
  14. * S. H. FISCHER. 82/03/16.
  15. * A. LIM. 82/07/15.
  16. * A. LIM. 82/27/27.
  17. * C. BRION 83/04/12,83/10/20.
  18. *
  19. * THIS PROC SENDS NET/OFF/N AND FAIL/APPL/N SM S.
  20. * IF THE APPLICATION IS DOWN AND THE CONNECTION COUNTS ARE ZERO
  21. * THEN THE APPROPRIATE SM CAN BE SENT.
  22. * EACH PLACE THE CONNECTION COUNTS ARE DECREMENTED MUST CALL
  23. * THIS ROUTINE.
  24. *
  25. * ENTRY:
  26. * AS = AST INDEX FOR APPLICATION.
  27. * FLAGS IN AST ENTRY AST$DNF, AST$NON, AST$AFN SET AS NEEDED.
  28. *
  29. * EXIT:
  30. * NET/OFF/N OR FAIL/APPL/N SENT IF NEEDED.
  31. *
  32. #
  33.  
  34.  
  35.  
  36.  
  37. #
  38. **** PROC NVFSCAD XREF LIST.
  39. #
  40. XREF
  41. BEGIN
  42. PROC ABORT; # ABORT MACREL ROUTINE #
  43. PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
  44. PROC SSSAWR; # ACCEPT WORKLIST REQUEST #
  45. PROC SSTRTS; # SS - RELEASE TABLE SPACE #
  46. END
  47. #
  48. ****
  49. #
  50.  
  51. ITEM AS I; # AST INDEX #
  52. ITEM FAILED$ B; # APPL FAILED INDICATOR #
  53. ITEM I I; # LOOP INDUCTION VARIABLE #
  54. ITEM MATCH B; # LOOP EXIT VARIABLE #
  55. ITEM PORD I; # PRIMARY AST ORDINAL #
  56. ITEM NETOFF$ B; # APPL NETOFF INDICATOR #
  57. ITEM SECFLAG B; # SECONDARY AST FLAG #
  58.  
  59. CONTROL EJECT;
  60.  
  61.  
  62. #
  63. * INITIALIZE LOCAL FLAGS.
  64. * CHECK IF CONNECTIONS EXIST TO APPLICATION.
  65. #
  66. NETOFF$ = FALSE;
  67. FAILED$ = FALSE;
  68. SECFLAG = FALSE;
  69. #
  70. * CHECK IF THERE ARE NO OUTSTANDING T-A, A-A, OR RESERVED
  71. * CONNECTIONS FOR THE APPLICATION, OR, IF THE APPL HAS NETTED OFF
  72. * OR FAILED, CHECK IF THERE ARE NO OUTSTANDING T-A OR A-A
  73. * CONNECTIONS.
  74. #
  75. IF ((AST$TACN[AS] EQ 0) AND
  76. (AST$AACN[AS] EQ 0) AND
  77. (AST$RACN[AS] EQ 0))
  78. OR
  79. ((AST$NON[AS] OR AST$AFN[AS]) AND
  80. (AST$TACN[AS] EQ 0) AND
  81. (AST$AACN[AS] EQ 0))
  82. THEN
  83. BEGIN
  84. SPMSG0[1] = 0;
  85.  
  86. IF AST$NON[AS]
  87. THEN
  88. BEGIN
  89. PFCSFC[1] = NETOFFN;
  90. NETAN[1] = AST$AN[AS];
  91. AST$DNF[AS] = FALSE;
  92. NVFUMQE( P<OTQ>, APSM[1], APPCMD, 0, LNETOFF );
  93. AST$JSN[AS] = " ";
  94. NETOFF$ = TRUE;
  95. AST$NON[AS] = FALSE;
  96. END
  97.  
  98. IF AST$AFN[AS]
  99. THEN
  100. BEGIN
  101. PFCSFC[1] = FAIAPPN;
  102. FAILAN[1] = AST$AN[AS];
  103. AST$DNF[AS] = FALSE;
  104. NVFUMQE( P<OTQ>, APSM[1], APPCMD, 0, LAPPF );
  105. AST$JSN[AS] = " ";
  106. FAILED$ = TRUE;
  107. AST$AFN[AS] = FALSE;
  108. END
  109.  
  110. #
  111. * CHECK IF SECONDARY APPLICATION. IF SO, CHECK IF ACTIVE AND IF SO,
  112. * DECREMENT THE NUMBER ACTIVE COPIES FOR THE PRIMARY AST ENTRY.
  113. * IF NOT ACTIVE, DECREMENT THE NUMBER PENDING COPIES OF THE PRIMARY
  114. * AST ENTRY AND RESET THE SECONDARY NETON PENDING FLAG.
  115. #
  116.  
  117. IF AST$SANAM[AS] NQ AST$PANAM[AS]
  118. THEN
  119. BEGIN
  120. FOR PORD = 0 STEP 1 WHILE
  121. (PORD LS (ASTLNGTH/ASTSIZ$) AND
  122. (AST$PANAM[PORD] NQ AST$SANAM[AS]))
  123. DO
  124. BEGIN
  125. END
  126.  
  127. $BEGIN
  128. IF PORD EQ (ASTLNGTH/ASTSIZ$)
  129. THEN
  130. ABORT;
  131. $END
  132.  
  133. SECFLAG = TRUE;
  134. IF ((AST$AN[AS] NQ 0) AND
  135. (NETOFF$ OR FAILED$))
  136. THEN
  137. BEGIN
  138. AST$CUCOP[PORD] = AST$CUCOP[PORD] - 1;
  139. END
  140. ELSE IF AST$AN[AS] EQ 0
  141. THEN
  142. AST$SNPF[PORD] = FALSE;
  143.  
  144. IF NETOFF$ OR FAILED$
  145. THEN
  146. BEGIN
  147. AST$AN[AS] = 0;
  148. AST$RACN[AS] = 0;
  149. END
  150.  
  151. #
  152. * RELEASE THE SECONDARY AST TABLE ENTRY ONLY IF THE APPL
  153. * HAS NETTED OFF, FAILED OR NEVER CAME ACTIVE.
  154. #
  155. IF AST$AN[AS] EQ 0
  156. THEN
  157. BEGIN
  158. AS = AS * ASTSIZ$;
  159. SSTRTS(P<AST>,AS,ASTSIZ$);
  160. END
  161. END # IF AST$SANAM #
  162.  
  163. #
  164. * ZERO THE APPLICATION NUMBER IF NETON OR FAIL SM SENT AND
  165. * NOT A SECONDARY APPLICATION ENTRY. ZERO THE NUMBER OF RESERVED
  166. * CONNECTIONS, AS THIS FIELD MAY NOT BE ZERO.
  167. #
  168. IF (NETOFF$ OR FAILED$) AND NOT SECFLAG
  169. THEN
  170. BEGIN
  171. AST$CUCOP[AS] = 0;
  172. AST$AN[AS] = 0;
  173. AST$RACN[AS] = 0;
  174. END
  175.  
  176. #
  177. * IF IDLE/DISABLE HOST HAS BEEN INITIATED AND ALL APPLICATIONS HAVE
  178. * TERMINATED, COMPLETE NVF EXECUTION.
  179. #
  180.  
  181. IF (NVFSTATE)
  182. THEN # IDLE/DISABLE HOST INITIATED #
  183. BEGIN
  184. MATCH = FALSE;
  185. FOR I = 0 STEP 1 WHILE (NOT MATCH)
  186. AND (I LS ASTLNGTH/ASTSIZ$)
  187. DO
  188. BEGIN
  189. IF (AST$AN[I] NQ 0)
  190. THEN
  191. BEGIN # STILL HAVE ACTIVE APPLICATION #
  192. MATCH = TRUE;
  193. END
  194. END
  195.  
  196. IF (NOT MATCH)
  197. THEN # ALL APPLICATIONS TERMINATED #
  198. BEGIN
  199. SSSAWR(WWDF"NICNE"); # COMPLETE NVF EXECUTION #
  200. END
  201. END
  202.  
  203. END
  204.  
  205.  
  206.  
  207.  
  208. END # NVFSCAD #
  209. TERM
cdc/nos2.source/nam5871/nvfscad.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator