User Tools

Site Tools


cdc:nos2.source:nam5871:nvfafai

NVFAFAI

Table Of Contents

  • [00008] PROC NVFAFAI
  • [00009] NVFAFAI - ADDITIONAL FAIL/APPL PROCESSING
  • [00012] ADDITIONAL FAIL/APPL PROCESSING.
  • [00046] PROC ABORT
  • [00047] PROC MESSAGE
  • [00053] PROC NVFACTC
  • [00054] PROC NVFCTRM
  • [00055] PROC NVFSCAD
  • [00056] PROC NVFUMQE

Source Code

NVFAFAI.txt
  1. *DECK NVFAFAI
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7. USETEXT TXTSUSS
  8. PROC NVFAFAI;
  9. # TITLE NVFAFAI - ADDITIONAL FAIL/APPL PROCESSING #
  10. BEGIN # NVFAFAI #
  11. #
  12. ** NVFAFAI - ADDITIONAL FAIL/APPL PROCESSING.
  13. *
  14. * P. A. MURRAY 84/08/01
  15. *
  16. * THIS PROCEDURE BREAKS ALL A-A CONNECTIONS HELD BY NVF FOR THE
  17. * APPLICATION THAT FAILED OR NETTED OFF.
  18. *
  19. * PROC NVFAFAI
  20. *
  21. * ENTRY:
  22. * THE FAI/APP/N SM IS IN MSGBUF, AND THE WORD COUNT AND BLOCK
  23. * HEADER WORDS ARE IN WCBUF AND ABHBUF RESPECTIVELY.
  24. *
  25. * EXIT:
  26. * ALL *PAAC* ENTRIES ASSOCIATED WITH THE FAILED OR NETTED OFF
  27. * APPLICATION HAVE BEEN RELEASED. A CR/TRM/R SM HAS BEEN SENT TO
  28. * THE *OTQ* (OR *WBQ*) FOR EACH RELEASED *PAAC* ENTRY.
  29. *
  30. * METHOD:
  31. * LOCATE THE *AST* ENTRY OF THE FAILED OR NETTED OFF APPLICATION.
  32. * SEARCH THE *PAAC* TABLE FOR A MATCH ON APPLICATION NUMBER. FOR
  33. * EACH *PAAC* ENTRY THAT MATCHES THE FAILED APPL, AND THAT IS
  34. * STILL CONNECTED TO NVF, AND THAT IS NOT AWAITING VCB DATA ON A
  35. * RECONNECT, CALL NVFCTRM TO SEND THE CR/TRM TO THE *OTQ* OR
  36. * *WBQ*. IF THE CR/TRM WAS SENT TO ONE OF THE ABOVE MENTIONED
  37. * QUEUES, RELEASE THE *PAAC* ENTRY AND OTHER RELATED TABLES.
  38. #
  39.  
  40. #
  41. **** PROC NVFAFAI - XREF LIST
  42. #
  43. $BEGIN
  44. XREF
  45. BEGIN
  46. PROC ABORT; # ABORT JOB #
  47. PROC MESSAGE; # SEND MESSAGE TO DAYFILE #
  48. END
  49. $END
  50.  
  51. XREF
  52. BEGIN
  53. PROC NVFACTC; # CLEAN UP TERMINATING CONN TBLS#
  54. PROC NVFCTRM; # PROCESS CR/TRM SM #
  55. PROC NVFSCAD; # COMPLETE APPLICATION DEPARTURE#
  56. PROC NVFUMQE; # TRANSFER SM TO QUEUE #
  57. END
  58.  
  59. $BEGIN
  60. #
  61. * NOPRIMSG - NO PRIMARY AST ENTRY WAS FOUND.
  62. #
  63. ARRAY NOPRIMSG [00:00] S(4);
  64. BEGIN
  65. ITEM NO$MSG C(00,00,32) =
  66. [" NVFAFAI - NO PRIMARY AST ENTRY."];
  67. ITEM NO$ZERO U(03,12,48) = [0];
  68. END
  69. $END
  70.  
  71. DEF RCAPF$ #24#; # REASON CODE FOR APPL FAILED #
  72. ITEM AORD I; # AST ENTRY ORDINAL #
  73. ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
  74. ITEM NORMTRM B; # FALSE, CR/TRM FROM INNER LAYER#
  75. ITEM PAC I; # PAAC ENTRY ORDINAL #
  76. ITEM PORD I; # PRIMARY AST ENTRY ORDINAL #
  77. ITEM SECFLAG B; # TRUE IF SEC. AST ENTRY #
  78. ITEM SENT B; # TRUE IF CR/TRM SENT TO QUEUE #
  79. ITEM VCBREL B; # SET TRUE TO RELEASE VCB #
  80.  
  81. CONTROL EJECT;
  82.  
  83. #
  84. * CALCULATE NUMBER OF AST ENTRIES.
  85. #
  86. NENTRY = ASTLNGTH / ASTSIZ$;
  87. #
  88. * LOCATE AST ENTRY OF FAILED OR NETTED OFF APPL.
  89. #
  90. FOR AORD = 0 STEP 1 WHILE
  91. ((AST$AN[AORD] NQ FAILAN[0]) AND
  92. (AORD LS NENTRY))
  93. DO
  94. BEGIN
  95. END
  96. #
  97. * IF THE AST ENTRY IS NOT FOUND, THE NET/OFF/N OR FAI/APP/N HAS
  98. * ALREADY BEEN SENT. IGNORE THIS SM AND RETURN.
  99. #
  100. IF AORD EQ NENTRY
  101. THEN
  102. BEGIN
  103. GOTO ENDEXIT;
  104. END
  105. #
  106. * CHECK IF THIS IS A SECONDARY APPLICATION. IF SO, DETERMINE THE
  107. * PRIMARY APPLICATION ORDINAL.
  108. #
  109. SECFLAG = FALSE;
  110. IF AST$SANAM[AORD] NQ AST$PANAM[AORD]
  111. THEN
  112. BEGIN
  113. FOR PORD = 0 STEP 1 WHILE
  114. (PORD LS NENTRY) AND
  115. (AST$PANAM[PORD] NQ AST$SANAM[AORD])
  116. DO
  117. BEGIN
  118. END
  119.  
  120. $BEGIN
  121. IF PORD EQ NENTRY # IF NO PRI APPL FOUND, ABORT #
  122. THEN
  123. BEGIN
  124. MESSAGE(NOPRIMSG,0);
  125. ABORT;
  126. END
  127. $END
  128.  
  129. IF PORD LS NENTRY
  130. THEN
  131. BEGIN
  132. SECFLAG = TRUE;
  133. END
  134. END
  135. #
  136. * WHILE A-A CONNECTIONS EXIST FOR THIS APPLICATION, SEARCH THE PAAC
  137. * TABLE FOR ALL ENTRIES TRYING TO ACCESS THE FAILED APPLICATION.
  138. #
  139. NORMTRM = FALSE;
  140. VCBREL = TRUE;
  141. NENTRY = PACLNGTH / PAACSIZ$;
  142. FOR PAC = 0 STEP 1 WHILE
  143. (PAC LS NENTRY) AND (AST$AACN[AORD] GR 0)
  144. DO
  145. BEGIN
  146. #
  147. * IF THIS PAAC ENTRY IS TRYING TO ACCESS THE FAILED APPLICATION,
  148. * AND THE CR/SWH/N HAS NOT YET BEEN RECEIVED, AND THE PAAC IS NOT
  149. * AWAITING VCB DATA ON A RECONNECT, THEN UPDATE THE AST ENTRY,
  150. * SEND CR/TRM/R, AND RELEASE PAAC ENTRY.
  151. #
  152. IF (PA$SWAPAN[PAC] EQ AST$AN[AORD]) AND
  153. (PA$NACN[PAC] NQ 0) AND
  154. (PA$STATE[PAC] NQ PAACST"PARCN")
  155. THEN
  156. BEGIN
  157. #
  158. * SET UP THE CR/TRM/R SM.
  159. #
  160. WCB$SMID[0] = CRTRM;
  161. WCB$WC[0] = LCRTRM + 2;
  162. ABHABT[0] = APPCMD;
  163. ABHADR[0] = 0;
  164. ABHTLC[0] = LCRTRM;
  165. ABHACT[0] = ACCR;
  166.  
  167. SPMSG0[0] = 0;
  168. PFCSFC[0] = CRTRM;
  169. RC[0] = RCAPF$;
  170. CRNACN[0] = PA$NACN[PAC];
  171. #
  172. * SEND THE CR/TRM TO NIP (BY-PASSING THE *CTQ*).
  173. #
  174. NVFCTRM(NORMTRM, SENT);
  175. #
  176. * IF THE CR/TRM WAS SENT (A CR/SWH/N HAS NOT COME IN AND DELETED
  177. * THE ACN ENTRY), CLEAN UP THE AST ENTRY AND PAAC TABLE.
  178. #
  179. IF SENT
  180. THEN
  181. BEGIN
  182. #
  183. * DECREMENT THE NUMBER OF A-A CONNECTIONS FOR THE SECONDARY
  184. * AST ENTRY AND FOR THE PRIMARY AST ENTRY IF THEY ARE NOT THE
  185. * SAME ENTRY. ALSO DECREMENT THE NUMBER OF THE INCOMING
  186. * CONNECTIONS IF THIS IS AN INCOMING CONNECTION.
  187. #
  188. AST$AACN[AORD] = AST$AACN[AORD] - 1;
  189.  
  190. IF PA$ICMCN[PAC]
  191. THEN
  192. BEGIN
  193. AST$ICCN[AORD] = AST$ICCN[AORD] - 1;
  194. END
  195.  
  196. IF SECFLAG
  197. THEN
  198. BEGIN
  199. AST$AACN[PORD] = AST$AACN[PORD] - 1;
  200. IF PA$ICMCN[PAC]
  201. THEN
  202. BEGIN
  203. AST$ICCN[PORD] = AST$ICCN[PORD] - 1;
  204. END
  205. END
  206. #
  207. * CALL NVFACTC TO RELEASE THE PAAC ENTRY AND OTHER RELATED
  208. * TABLES.
  209. #
  210. NVFACTC(PAC,VCBREL);
  211. #
  212. * DECREMENT ENTRY COUNT AND INDEX TO TAKE INTO ACCOUNT THE
  213. * DELETION OF THE PAAC ENTRY.
  214. #
  215. NENTRY = NENTRY - 1;
  216. PAC = PAC - 1;
  217. END
  218. END
  219. END
  220. #
  221. * COMPLETE APPLICATION DEPARTURE FOR THE FAILED APPLICATION. IF
  222. * THIS IS A SECONDARY APPLICATION, THEN COMPLETE APPLICATION
  223. * DEPARTURE FOR THE PRIMARY APPLICATION, ALSO.
  224. #
  225. NVFSCAD(AORD);
  226. IF SECFLAG
  227. THEN
  228. BEGIN
  229. NVFSCAD(PORD);
  230. END
  231.  
  232. ENDEXIT:
  233. END
  234. TERM
cdc/nos2.source/nam5871/nvfafai.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator