User Tools

Site Tools


cdc:nos2.source:nam5871:nvfiivf

NVFIIVF

Table Of Contents

  • [00003] PROC NVFIIVF
  • [00004] NVFIIVF - INITIALIZE THE VCB FILE
  • [00008] INITIALIZE THE VCB FILE.
  • [00039] PROC RECALL
  • [00040] PROC REWIND
  • [00041] PROC WRITECW
  • [00042] PROC WRITEF
  • [00043] PROC WRITEWC
  • [00059] PRUBUF - ONE VCB RECORD + 2 CONTROL WORDS

Source Code

NVFIIVF.txt
  1. *DECK NVFIIVF
  2. USETEXT TXVCBNV
  3. PROC NVFIIVF;
  4. # TITLE NVFIIVF - INITIALIZE THE VCB FILE #
  5.  
  6. BEGIN # NVFIIVF #
  7. #
  8. ** NVFIIVF - INITIALIZE THE VCB FILE.
  9. *
  10. * A. LIM 81/09/14
  11. *
  12. * THIS ROUTINE IS PART OF THE INITIALIZATION PROCESS FOR NVF.
  13. * ITS JOB IS TO PRESET THE VCB FILE WITH ZEROES, AND PRE-ASSIGN
  14. * EACH ENTRY WITH A VCB ORDINAL.
  15. *
  16. * PROC NVFIIVF
  17. *
  18. * ENTRY NONE
  19. *
  20. * EXIT VCB FILE INITIALIZED.
  21. *
  22. * NOTES NONE
  23. *
  24. * METHOD MARCEL ROUTINE WRITECW IS CALLED TO WRITE PRU
  25. * IMAGES CONTINUOUSLY ON THE VCB FILE.
  26. *
  27. #
  28.  
  29.  
  30.  
  31.  
  32.  
  33. #
  34. **** PROC NVFIIVF - XREF LIST BEGIN
  35. #
  36.  
  37. XREF
  38. BEGIN
  39. PROC RECALL;
  40. PROC REWIND;
  41. PROC WRITECW;
  42. PROC WRITEF;
  43. PROC WRITEWC;
  44. END
  45.  
  46. #
  47. ****
  48. #
  49.  
  50.  
  51. # ITEMS #
  52.  
  53. ITEM I,J,K,L; # INDUCTION VARIABLES #
  54. ITEM ENTRYNO U; # ENTRY NUMBER #
  55. ITEM VCBORD U; # VCB ORDINAL #
  56.  
  57.  
  58. #
  59. ** PRUBUF - ONE VCB RECORD + 2 CONTROL WORDS
  60. *
  61. * PRUBUF CONTAINS THE IMAGE OF ONE VCB RECORD + 2 CONTROL WORDS
  62. * WITHIN A PRU.
  63. #
  64.  
  65. ARRAY PRUBUF[00:VBRECDCW1$] S(1);
  66. BEGIN
  67. ITEM PR$WORD U(00,00,60); # FULL WORD REFERENCE #
  68. ITEM PR$PRUSIZ U(00,06,18); # PRU SIZE #
  69. ITEM PR$BL U(00,36,24); # BLOCK LENGTH #
  70. ITEM PR$LN U(00,00,12); # LEVEL NUMBER #
  71. ITEM PR$VCBORD U(00,48,12); # VCB ORDINAL #
  72. END
  73.  
  74. #
  75. * CWBUF - 2 CONTROL WORDS
  76. #
  77. ARRAY CWBUF[00:00] S(2);
  78. BEGIN
  79. ITEM CW$WORD U(00,00,60); # FULL WORD REFERENCE #
  80. ITEM CW$PRUSIZ U(00,06,18) = [O"100"]; # PRU SIZE #
  81. ITEM CW$LN U(01,00,12) = [O"17"]; #LEVEL NUMBER #
  82. END
  83.  
  84. CONTROL EJECT;
  85. #
  86. * INITIALIZES VCB FET
  87. #
  88.  
  89. VB$LFN[0] = "VCBFILE";
  90. VB$CODE[0] = 3;
  91. VB$R[0] = TRUE;
  92. VB$L[0] = VBFETSIZ$ - 5;
  93.  
  94.  
  95. #
  96. * SET VCB FET TO THE LOCATION OF VCB BUFFER.
  97. #
  98.  
  99. VB$FIRST[0] = LOC(VCBBUFR);
  100. VB$IN[0] = LOC(VCBBUFR);
  101. VB$OUT[0] = LOC(VCBBUFR);
  102. VB$LIMIT[0] = VB$FIRST[0] + VBBUFLIM$ + 1;
  103.  
  104.  
  105.  
  106. # PRESET THE WHOLE BUFFER WITH ZEROES #
  107.  
  108. FOR I = 0 STEP 1 UNTIL VBRECDCW1$
  109. DO
  110. BEGIN
  111. PR$WORD[I] = 0;
  112. END
  113.  
  114.  
  115. # SET CONTROL WORDS #
  116.  
  117. PR$PRUSIZ[0] = PRUSIZ$; # SET PRU SIZE #
  118. PR$BL[0] = VBBL$; # SET BLOCK LENGTH #
  119. PR$LN[VBRECDCW1$] = VBLNEOR$; # SET EOR AS THE LEVEL NUMBER #
  120.  
  121. # SET VCB ORDINALS FOR ALL ENTRIES WITHIN THE FIRST PRU #
  122.  
  123. ENTRYNO = 1;
  124. FOR J = 1 STEP 1 UNTIL VBMXENTRY$
  125. DO
  126. BEGIN
  127. PR$VCBORD[ENTRYNO] = J; # SEQUENTIALLY ASSIGN VCB ORD #
  128. ENTRYNO = ENTRYNO + VBESIZ$;
  129. END
  130.  
  131. #
  132. * WRITE THE FIRST RECORD TO THE CIO BUFFER
  133. #
  134.  
  135. REWIND(VCBFET); # REWIND VCB FILE #
  136. WRITEWC(VCBFET,PRUBUF,VBRECDCW$); # TRANSFR THE RECORD TO CIR BUF#
  137. WRITECW(VCBFET); # WRITE FUNCTION CODE ON VCB FET#
  138.  
  139.  
  140. #
  141. * WRITE THE REST (MAXSEC$ - 1) OF RECORDS TO VCB FILE
  142. #
  143.  
  144.  
  145. FOR K = 1 STEP 1 UNTIL MAXSEC$ - 1
  146. DO
  147. BEGIN
  148. VCBORD = K * 2 ** 3 + 1; # SET VCB ORDINAL FOR THIS(KTH) PRU#
  149. ENTRYNO = 1;
  150. FOR L = 1 STEP 1 UNTIL VBMXENTRY$
  151. DO
  152. BEGIN # ASSIGN VCB ORDINAL #
  153. PR$VCBORD[ENTRYNO] = VCBORD;
  154. VCBORD = VCBORD + 1;
  155. ENTRYNO = ENTRYNO + VBESIZ$;
  156. END
  157. WRITEWC(VCBFET,PRUBUF,VBRECDCW$); # TRANSFER THE RECORD #
  158. END
  159. WRITEWC(VCBFET,CWBUF,2); # WRITE 2 CONTROL WORDS #
  160. WRITECW(VCBFET);
  161. RECALL(VCBFET);
  162.  
  163.  
  164. END # NVFIIVF #
  165.  
  166. TERM
cdc/nos2.source/nam5871/nvfiivf.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator