User Tools

Site Tools


cdc:nos2.source:nam5871:nvfvwvf

NVFVWVF

Table Of Contents

  • [00005] PROC NVFVWVF(SWTESS)
  • [00006] NVFVWVF - WRITE THE VCB FILE.
  • [00010] WIRTES THE VCB DATA FROM VWBT BACK TO THE VCB FILE.
  • [00051] PROC ABORT
  • [00052] PROC MESSAGE
  • [00053] PROC NVFVRVF
  • [00054] PROC REWRITR
  • [00055] PROC SSTATS
  • [00056] PROC WRITEW

Source Code

NVFVWVF.txt
  1. *DECK NVFVWVF
  2. USETEXT TEXTNVF
  3. USETEXT TXVCBNV
  4.  
  5. PROC NVFVWVF(SWTESS);
  6. # TITLE NVFVWVF - WRITE THE VCB FILE. #
  7.  
  8. BEGIN # NVFVWVF #
  9. #
  10. ** NVFVWVF - WIRTES THE VCB DATA FROM VWBT BACK TO THE VCB FILE.
  11. *
  12. * A. LIM. 81/12/04.
  13. *
  14. * THIS PROCEDURE WRITES THE VCB DATA FROM *VWBT* BACK TO THE
  15. * VCB FILE.
  16. *
  17. * PROC NVFVWVF(SWTESS)
  18. *
  19. * ENTRY *VWBT* (VCB WRITE BLOCK TABLE)IN TEXTNVF CONTAINS
  20. * BLOCKS(PRUS) OF VCB DATA.
  21. * *ICFLAG* IS A FLAG INDICATING IF THIS IS INITIAL CALL
  22. * OF THIS PROC.
  23. * *VWBTIDX* AND *MXVWBTIDX* IS THE CURRENT INDEX OF VWBT
  24. * AND THE MAXIMUM INDEX OF VWBT RESPECTIVELY.
  25. *
  26. * EXIT FORMAL RETURN PARAMETER ARRAY SWTESS IS SET AS FOLLOWS:
  27. * - IF ALL DATA IN *VWBT* HAVE BEEN WRITTEN TO VCB FILE,
  28. * SWTESS IS SET SO THAT PROC *NVFVRVF* IS CALLED WHEN
  29. * *VRQ* NOT EMPTY.
  30. * - WHEN WAITING FOR CIO FUNCTION REWRITR TO COMPLETE,
  31. * SWTESS IS SET SUCH THAT THIS ROUTINE WILL AGAIN BE
  32. * CALLED WHEN THE FET COMPLETE BIT IS SET.
  33. *
  34. * METHOD THIS PROC PROCESSES ONE BLOCK OF DATA FROM *VWBT* AT A
  35. * TIME. EACH TIME, IT WILL ISSUE A CIO REWRITR
  36. * FUNCTION TO REWRITE DATA FROM *VWBT* BACK TO DISK
  37. * FILE, THEN GOES TO SLEEP WAITING FOR THE CIO FUNCTION
  38. * TO COMPLETE. IT KEEPS PROCESSING DATA IN THIS MANNER
  39. * UNTIL *VWBT* IS EXHAUSTED.
  40. #
  41.  
  42.  
  43.  
  44.  
  45.  
  46. #
  47. **** PROC NVFVWVF - XREF LIST BGEGIN.
  48. #
  49. XREF
  50. BEGIN
  51. PROC ABORT; # MACREL - ABORT TASK #
  52. PROC MESSAGE; # MACREL - ISSUE MESSAGE #
  53. PROC NVFVRVF; # NVF - READ VCB FILE #
  54. PROC REWRITR; # MACREL - REWRITE END OF RECORD #
  55. PROC SSTATS; # SS-ALLOCATE TABLE SPACE (DECRS OR INCRS)#
  56. PROC WRITEW; # MACREL - WRITE DATA FROM WORKING BUFFER #
  57. END
  58. #
  59. ****
  60. #
  61.  
  62. # ITEM #
  63.  
  64. ITEM I I; # INDUCTION VARIABLE #
  65. ITEM ICFLAG B=TRUE; # FLAG SET IF THIS IS INIT CALL OF PROC #
  66. ITEM VWBTIDX I; # CURRENT INDEX OF VWBT #
  67. ITEM MXVWBTIDX I; # MAX VALUE OF THE ABOVE INDEX #
  68.  
  69.  
  70. $BEGIN
  71. #
  72. * DAYFILE MESSAGE ARRAY: "VWBT EMPTY - FALSE INVOKE OF NVFVWVF".
  73. #
  74. ARRAY VWMSG[00:00] S(4);
  75. BEGIN
  76. ITEM VW$MSG C(00,00,36)
  77. = ["VWBT EMPTY - FALSE INVOKE OF NVFVWVF"];
  78. ITEM VW$ZERO U(03,18,42) = [0]; # ZERO BYTE TERMINATOR #
  79. END
  80. $END
  81.  
  82.  
  83. *CALL SWTESS
  84.  
  85. CONTROL EJECT;
  86.  
  87. IF VWBLNGTH NQ 0
  88. THEN
  89. BEGIN # LOOKING GOOD. VWBT NOT EMPTY #
  90. IF ICFLAG
  91. THEN
  92. BEGIN # INITIAL CALL OF THIS PROC #
  93. VWBTIDX = 0;# INIT VWBT INDEX TO 0 #
  94. MXVWBTIDX = VWBLNGTH/VBRECDN$; # CALC MAX VALUE OF VWBT INDX#
  95. ICFLAG = FALSE; # CLEAR INITIAL CALL FLAG #
  96. END
  97.  
  98. IF VWBTIDX LS MXVWBTIDX
  99. THEN
  100. BEGIN # MORE DATA TO PROCESS #
  101. WRITEW(VCBFET,VWBT[VWBTIDX],VBRECDN$); # TRFR DATA TO C-BUF #
  102. VB$W[0] = TRUE; # SET W IN VCB FET #
  103. VB$RR[0] = VWB$RPA[VWBTIDX] + 1; # SET RR IN VCB FET #
  104. REWRITR(VCBFET,VBLNEOR$); # REWRITE DATA BACK TO VCB FILE #
  105. VWBTIDX = VWBTIDX + 1; # BUMP VWBT INDEX #
  106.  
  107. # WAKE THIS PROC UP AGAIN WHEN CIO REWRITR COMPLETES. #
  108.  
  109. STE$ADDR1[0] = LOC(VCBFET);
  110. STE$ADDR2[0] = 0;
  111. STE$RTN[0] = LOC(NVFVWVF);
  112. STE$INIT1[0] = VB$WORD[0];
  113. STE$CBIT1[0] = FALSE;
  114. STE$INIT2[0] = 0;
  115. RETURN; # EXIT #
  116. END
  117. ELSE
  118. BEGIN # DONE PROCESSING VWBT #
  119. SSTATS(P<VWBT>, -VWBLNGTH); # CLEAR VWBT #
  120. END
  121. END
  122. ELSE
  123. BEGIN
  124. $BEGIN # VWBT EMPTY #
  125. MESSAGE(VWMSG[0],DFILE$);
  126. ABORT;
  127. $END
  128. END
  129. #
  130. * SET-UP TO INVOKE NVFVRVF.
  131. #
  132. ICFLAG = TRUE; # RESET FLAG FOR NEXT FRESH START-UP #
  133. STE$ADDR1[0] = LOC(INVVRVF); # WATCH INTERRUPT CELL FOR VRQ #
  134. STE$ADDR2[0] = 0; # AND WATCH ONLY ONE CELL #
  135. STE$RTN[0] = LOC(NVFVRVF); # WAKE NVFVRVF UP WHEN VRQ NQ 0 #
  136. STE$INIT1[0] = 0;
  137. STE$INIT2[0] = 0;
  138.  
  139. END # NVFVRVF #
  140.  
  141. TERM
cdc/nos2.source/nam5871/nvfvwvf.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator