User Tools

Site Tools


cdc:nos2.source:nam5871:nvfarvd

NVFARVD

Table Of Contents

  • [00009] PROC NVFARVD
  • [00010] NVFARVD - RECEIVE A-A VCB DATA
  • [00014] RECEIVE A-A VCB DATA.
  • [00049] PROC NVFUMQE
  • [00050] PROC SSTRTS
  • [00051] PROC NVFAIAM
  • [00052] PROC NVFSCAD
  • [00053] PROC NVFUFVO
  • [00054] PROC NVFACTC
  • [00055] PROC MESSAGE
  • [00056] PROC ABORT

Source Code

NVFARVD.txt
  1. *DECK NVFARVD
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXTSUSS
  5. USETEXT TXTANVF
  6. USETEXT TXSMNVF
  7. USETEXT TXTAPSS
  8.  
  9. PROC NVFARVD;
  10. # TITLE NVFARVD - RECEIVE A-A VCB DATA #
  11.  
  12. BEGIN # NVFARVD #
  13. #
  14. ** NVFARVD - RECEIVE A-A VCB DATA.
  15. *
  16. * C. BRION 83/01/03, 83/02/18, 83/05/10, 83/12/12.
  17. *
  18. * THIS PROCEDURE PROCESSES THE VCB DATA RETURNED FROM A VCB READ
  19. * REQUEST FOR A-A CONNECTIONS.
  20. *
  21. * PROC NVFARVD
  22. *
  23. * ENTRY:
  24. * THE VCB DATA RESIDES IN MSGBUF.
  25. *
  26. * EXIT:
  27. * TWO DIFFERENT POSSIBLE EXIT CONDITIONS EXIST BASED ON THE
  28. * STATE OF THE PAAC AND VCB ENTRIES.
  29. *
  30. * IN BOTH CASES:
  31. * AN AEAA ACCOUNTING MESSAGE IS ISSUED.
  32. * APPLICATION DEPARTURE PROCESSING IS PERFORMED.
  33. * THE NUMBER OF A-A CONNECTIONS FOR THE APPLICATION IS
  34. * DECREMENTED.
  35. *
  36. * IF THE TERMINATION IS DUE TO A RECONNECT, THEN A CR/TRM/R SM
  37. * IS ISSUED. THE PAAC ENTRY, VCB ORDINAL AND ACTIVE PID TABLE
  38. * SPACE ARE RELEASED VIA A CALL TO NVFACTC.
  39. #
  40.  
  41. CONTROL EJECT;
  42.  
  43. #
  44. **** PROC NVFARVD - XREF LIST.
  45. #
  46.  
  47. XREF
  48. BEGIN
  49. PROC NVFUMQE; # MAKE QUEUE ENTRY #
  50. PROC SSTRTS; # SS-RELEASE TABLE SPACE #
  51. PROC NVFAIAM; # ISSUE A-A ACCOUNT MSG #
  52. PROC NVFSCAD; # COMPLETE APPL DEPARTURE #
  53. PROC NVFUFVO; # FREE VCB ORDINAL #
  54. PROC NVFACTC; # CLEANUP TERMINATING CONN #
  55. PROC MESSAGE; # MESSAGE TO DAYFILE #
  56. PROC ABORT;
  57. END
  58.  
  59. #
  60. ****
  61. #
  62.  
  63. ITEM ASENTRY I; # NUMBER AST ENTRIES #
  64. ITEM NENTRY I; # NUMBER VARIABLE #
  65. ITEM PAC I; # PAAC ENTRY INDEX #
  66. ITEM SAVESTATE I; # PAAC STATE #
  67. ITEM VCBSTATE I; # VCB STATE #
  68. ITEM AORD I; # APPL AST ORDINAL #
  69. ITEM MTYP I; # ACCOUNT MSG TYPE #
  70. ITEM SAVEACN I; # LOCAL ACN SAVE VARIABLE #
  71. ITEM SAVERC I; # REASON CODE LOCAL #
  72. ITEM PORD I; # PRIMARY AST ORDINAL #
  73. ITEM VCBREL B; # VCB RELEASE FLAG #
  74.  
  75. CONTROL EJECT;
  76.  
  77. #
  78. * NVFARVD PROCEDURE START
  79. #
  80.  
  81. #
  82. * SET VCB RELEASE FLAG TRUE.
  83. * SET VCB BUFFER TEMPLATE.
  84. * LOCATE PAAC ENTRY USING VCB ORDINAL AS KEY.
  85. #
  86.  
  87. VCBREL = TRUE;
  88. P<VCBBUF> = LOC(MSGBUF[0]);
  89. NENTRY = PACLNGTH / PAACSIZ$;
  90. FOR PAC = 0 STEP 1 WHILE (PA$VCB[PAC] NQ VCB$VCB[0]
  91. AND PAC LS NENTRY)
  92. DO
  93. BEGIN
  94. END
  95.  
  96. #
  97. * LOCATE THE AST ENTRY OF THIS PAAC ENTRY.
  98. #
  99.  
  100. ASENTRY = ASTLNGTH/ASTSIZ$;
  101. FOR AORD = 0 STEP 1 WHILE
  102. (AORD LS ASENTRY AND
  103. AST$PANAM[AORD] NQ PA$SWAP[PAC])
  104. DO
  105. BEGIN
  106. END
  107. #
  108. * CHECK FOR PRIMARY AST ENTRY IF SECONDARY AST ORDINAL.
  109. #
  110. PORD = AORD;
  111. IF AST$PANAM[AORD] NQ AST$SANAM[AORD]
  112. THEN
  113. BEGIN
  114. FOR PORD = 0 STEP 1 WHILE
  115. (PORD LS ASENTRY) AND
  116. (AST$SANAM[AORD] NQ AST$PANAM[PORD])
  117. DO
  118. BEGIN
  119. END
  120. IF PORD EQ ASENTRY
  121. THEN
  122. PORD = AORD;
  123. END
  124.  
  125. #
  126. * SAVE THE PAAC STATE LOCALLY.
  127. #
  128.  
  129. SAVESTATE = PA$STATE[PAC];
  130. SAVEACN = PA$NACN[PAC];
  131. SAVERC = PA$IAPRC[PAC];
  132.  
  133. #
  134. * MOVE THE VCB INFO INTO THE PAAC ENTRY.
  135. #
  136.  
  137. PA$TIMWRD[PAC] = VCB$WRD1[0];
  138. PA$FWORD[PAC] = VCB$WRD2[0];
  139. PA$UWORD[PAC] = VCB$WRD4[0];
  140. PA$RHWRD[PAC] = VCB$WRD3[0];
  141. PA$VCB[PAC] = VCB$VCB[0];
  142. PA$PORT[PAC] = VCB$APORT[0];
  143. PA$SWAPAN[PAC] = VCB$ASWAPAN[0];
  144. PA$SWAP[PAC] = VCB$ASWAP[0];
  145. PA$SL[PAC] = VCB$ASL[0];
  146. PA$STATE[PAC] = VCB$ASTATE[0];
  147. PA$IAPRC[PAC] = VCB$AIAPRC[0];
  148. PA$NUMOUT[PAC] = VCB$ANUMOUT[0];
  149. PA$SNODE[PAC] = VCB$ASNODE[0];
  150. PA$DNOD[PAC] = VCB$ADNOD[0];
  151. PA$DT[PAC] = VCB$ADT[0];
  152. PA$ICMCN[PAC] = VCB$ICMCN[0];
  153. #
  154. * RESTORE THE PAAC STATE.
  155. #
  156.  
  157. PA$STATE[PAC] = SAVESTATE;
  158.  
  159. #
  160. * ISSUE AEAA ACCOUNT MESSAGE.
  161. #
  162.  
  163. MTYP = AEAA$;
  164. NVFAIAM(PAC,MTYP);
  165. #
  166. * DECREMENT NUMBER OF CONNECTIONS TO SEC AST ENTRY.
  167. * COMPLETE APPL DEPARTURE FOR SEC AST ENTRY.
  168. #
  169. AST$AACN[AORD] = AST$AACN[AORD] - 1;
  170. IF PA$ICMCN[PAC]
  171. THEN
  172. BEGIN
  173. AST$ICCN[AORD] = AST$ICCN[AORD] - 1;
  174. END
  175. NVFSCAD(AORD);
  176.  
  177. #
  178. * CHECK IF SECONDARY AST ENTRY. IF SO, DECREMENT NUMBER OF
  179. * CONNECTIONS FOR PRIMARY AND COMPLETE APPLICATION DEPARTURE.
  180. #
  181.  
  182. IF AORD NQ PORD
  183. THEN
  184. BEGIN
  185. AST$AACN[PORD] = AST$AACN[PORD] - 1;
  186. IF PA$ICMCN[PAC]
  187. THEN
  188. BEGIN
  189. AST$AACN[PORD] = AST$AACN[PORD] - 1;
  190. END
  191. NVFSCAD(PORD);
  192. END
  193.  
  194. #
  195. * FOR RECONNECT STATES, A CR/TRM/R SM MUST BE ISSUED.
  196. #
  197.  
  198. IF SAVESTATE EQ PAACST"PARCN"
  199. THEN
  200. BEGIN
  201. SPMSG0[1] = 0;
  202. CRACN[1] = SAVEACN;
  203. RC[1] = SAVERC;
  204. PFCSFC[1] = CRTRM;
  205. NVFUMQE(P<CTQ>,APSM[1],APPPR$,0,LCRTRM);
  206. END
  207.  
  208. #
  209. * RELEASE PAC ENTRY, ACPID TABLE ENTRY AND VCB VIA NVFACTC CALL.
  210. #
  211.  
  212. NVFACTC(PAC,VCBREL);
  213.  
  214. END # NVFARVD #
  215. TERM
cdc/nos2.source/nam5871/nvfarvd.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator