User Tools

Site Tools


cdc:nos2.source:nam5871:nvfturt

NVFTURT

Table Of Contents

  • [00005] PROC NVFTURT((VCB),PT,PRIAPP)
  • [00006] NVFTURT - UPDATE RAU TABLE
  • [00010] UPDATE RAU TABLE.
  • [00045] PROC ABORT
  • [00046] PROC MESSAGE
  • [00047] PROC SSTRTS

Source Code

NVFTURT.txt
  1. *DECK NVFTURT
  2. USETEXT TEXTNVF
  3. USETEXT TXTAPSS
  4.  
  5. PROC NVFTURT((VCB),PT,PRIAPP);
  6. # TITLE NVFTURT - UPDATE RAU TABLE #
  7.  
  8. BEGIN # NVFTURT #
  9. #
  10. ** NVFTURT - UPDATE RAU TABLE.
  11. *
  12. * E. THAVIKULWAT 81/11/09
  13. * C. BRION 83/05/10
  14. *
  15. * THIS PROCEDURE'S MAIN FUNCTION IS TO GET *PTAC* ENTRY THAT
  16. * MATCHES ON VCB AND TO DELETE ENTRY FROM *RAU* TABLE IF NEED TO
  17. * FOR AN INTERACTIVE DEVICE. IT IS CALLED INTO EXECUTION BY THE
  18. * FOLLOWING PROCEDURES:
  19. * *NVFTCB* *NVFTRCN* *NVFTRVD*
  20. *
  21. * PROC NVFTURT
  22. *
  23. * ENTRY:
  24. * VCB = VCB ORDINAL
  25. * PRIAPP = TRUE IF THE *RAU* ENTRY IS FOR A PRIMARY APPLICATION.
  26. * = FALSE IF THE *RAU* ENTRY IS FOR A SECONDARY
  27. * APPLICATION, OR AN APPLICATION NOT INVOLVED IN LOANING.
  28. *
  29. * EXIT:
  30. * PT = INDEX TO PTAC ENTRY.
  31. * RAU TABLE UPDATED.
  32. *
  33. * METHOD:
  34. * GET *PTAC* ENTRY THAT MATCHES ON VCB. IF INTERACTIVE DEVICE
  35. * AND UNIQUE IDENTIFIER FLAG IS SET IN THE *AST* ENTRY FOR THIS
  36. * APPLICATION, THEN DELETE IT'S ENTRY FROM THE *RAU* TABLE.
  37. #
  38.  
  39. #
  40. **** PROC NVFTURT - XREF LIST.
  41. #
  42.  
  43. XREF
  44. BEGIN
  45. PROC ABORT; # ABORT JOB #
  46. PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
  47. PROC SSTRTS; # REMOVE TABLE SPACE #
  48. END
  49.  
  50. #
  51. ****
  52. #
  53. ITEM AS I; # SUBSCRIPT FOR ARRAY AST #
  54. ITEM ASENTRY I; # NUMBER AST ENTRIES #
  55. ITEM FIND B; # EXIT LOOP VARIABLE #
  56. ITEM I I; # LOOP VARIABLE #
  57. ITEM MATCH B; # EXIT LOOP VARIABLE #
  58. ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
  59. ITEM OFFSET I; # OFFSET FROM TOP OF TABLE TO THE ENTRY #
  60. ITEM PRIAPP B; # PRIMARY APPLICATION INDICATOR #
  61. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  62. ITEM RAU$ENTRY I; # NUMBER OF ENTRIES IN RAU TABLE #
  63. ITEM VCB I; # VCB ORDINAL VARIABLE #
  64.  
  65. #
  66. * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT
  67. * FINDING AN EXPECTED PTAC/RAU ENTRY.
  68. #
  69. ARRAY DAYMSG[00:00] S(4);
  70. BEGIN
  71. ITEM DAY$MSG1 C(00,00,22) = ["NVFTURT - CANNOT FIND "];
  72. ITEM DAY$TYPE C(02,12,04); # PTAC OR RAU #
  73. ITEM DAY$MSG2 C(02,36,06) = [" ENTRY"];
  74. END
  75. #
  76. * DETERMINE NUMBER OF AST ENTRIES.
  77. #
  78. ASENTRY = ASTLNGTH/ASTSIZ$;
  79.  
  80. #
  81. * SEARCH PTAC TABLE FOR ENTRY THAT MATCHES ON VCB.
  82. #
  83. MATCH = FALSE;
  84. NENTRY = PTALNGTH / PTACSIZ$; # CALCULATE NUMBER OF ENTRIES #
  85. FOR PT = 0 STEP 1 WHILE (NOT MATCH AND PT LS NENTRY)
  86. DO
  87. BEGIN
  88. IF PTA$VCB[PT] EQ VCB
  89. THEN # PTAC ENTRY FOUND #
  90. BEGIN
  91. FIND = TRUE;
  92. #
  93. * IF INTERACTIVE DEVICE, AND THE UNIQUE IDENTIFIER FLAG IS SET
  94. * IN THE *AST* ENTRY FOR THIS APPLICATION, THEN ITS ENTRY IN
  95. * THE *RAU* TABLE MUST BE DELETED. IF PRIAPP IS TRUE, THEN SEARCH
  96. * THE *AST* TABLE FOR THE PRIMARY APPLICATION ENTRY. IF PRIAPP
  97. * IS FALSE, THEN SEARCH THE *AST* TABLE FOR THE SWITCHED APPLICATION
  98. * ENTRY.
  99. #
  100. IF PRIAPP
  101. THEN
  102. BEGIN
  103. FOR AS = 0 STEP 1 WHILE
  104. (AS LS ASENTRY AND
  105. AST$AN[AS] NQ PTA$PRIAN[PT])
  106. DO
  107. BEGIN
  108. END
  109. END
  110. ELSE
  111. BEGIN
  112. FOR AS = 0 STEP 1 WHILE
  113. (AS LS ASENTRY AND
  114. AST$PANAM[AS] NQ PTA$SWTAPP[PT])
  115. DO
  116. BEGIN
  117. END
  118. END
  119.  
  120. IF AS LS ASENTRY
  121. THEN
  122. BEGIN
  123. IF ( (PTA$DT[PT] EQ DT$CONS)
  124. OR (PTA$DT[PT] EQ DT$USER)
  125. OR (PTA$DT[PT] EQ DT$CLP ) )
  126. AND ( AST$UIDF[AS] )
  127. THEN # INTERACTIVE AND UNIQUE #
  128. BEGIN
  129. FIND = FALSE;
  130. RAU$ENTRY = RAULNGTH / RAUSIZ$;
  131. FOR I = 0 STEP 1 WHILE (NOT FIND AND I LS RAU$ENTRY)
  132. DO
  133. BEGIN
  134. IF (RAU$AN[I] EQ AST$AN[AS])
  135. AND (RAU$UIDX[I] EQ PTA$UIDX[PT])
  136. AND (RAU$FNAM[I] EQ PTA$FNAM[PT])
  137. THEN # RAU ENTRY FOUND #
  138. BEGIN
  139. OFFSET = I * RAUSIZ$; # OFFSET TO THE ENTRY #
  140. SSTRTS(P<RAU>,OFFSET,RAUSIZ$); # DELETE RAU ENTRY #
  141. FIND = TRUE; # EXIT LOOP #
  142. END
  143. END
  144. END
  145. END
  146. MATCH = TRUE; # EXIT LOOP #
  147. END
  148. END
  149.  
  150. PT = PT - 1;
  151.  
  152.  
  153. IF NOT MATCH
  154. THEN
  155. BEGIN
  156. DAY$TYPE[0] = "PTAC";
  157. MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
  158. ABORT;
  159. END
  160.  
  161. $BEGIN
  162. IF NOT FIND
  163. THEN
  164. BEGIN
  165. DAY$TYPE[0] = "RAU ";
  166. MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
  167. ABORT; # ABORT NVF #
  168. END
  169. $END
  170.  
  171. END # END NVFTURT #
  172.  
  173. TERM
cdc/nos2.source/nam5871/nvfturt.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator