User Tools

Site Tools


cdc:nos2.source:nam5871:txvcbnv

TXVCBNV

Table Of Contents

  • [00002] PROC TXVCBNV
  • [00003] TXVCBNV - VCB I/O SYMPL TEXT FOR NVF.
  • [00007] VCB I/O SYMPL TEXT FOR NVF.
  • [00062] VCBIO - A COMMON BLOCK FOR VCB I/O PROCESSING.
  • [00073] TVRQ - TEMPLATE FOR VCB READ REQUEST QUEUE.
  • [00178] AVST - ACTIVE-VCB-SERIAL-SEARCH-REQUEST-TABLE.
  • [00221] VOT AND VDT - VCB ORDINAL TABLE AND
  • [00263] VCBFET AND VCBBUFR - FET AND CIRCULAR BUFFER FOR THE VCB.
  • [00296] VCBWSA - WORKING STORAGE AREA FOR 1 PRU OF VCB DATA.

Source Code

TXVCBNV.txt
  1. *DECK TXVCBNV
  2. PROC TXVCBNV;
  3. # TITLE TXVCBNV - VCB I/O SYMPL TEXT FOR NVF. #
  4.  
  5. BEGIN # TXVCBNV #
  6. #
  7. ** TXVCBNV - VCB I/O SYMPL TEXT FOR NVF.
  8. *
  9. * A. LIM. 81/11/04.
  10. * C. BRION. 82/06/22.
  11. *
  12. * THIS PROC GENERATES A SYMPL TEXT FOR COMPILING NVF ACCESS VCB
  13. * FILE ROUTINES. IT CONTAINS DEFINITIONS OF SYMBOLS, ITEMS, ARRAYS
  14. * AND COMMON BLOCKS USED FOR THOSE ROUTINES AND VCB I/O PROCESSING.
  15. *
  16. * PROC TXVCBNV
  17. #
  18.  
  19. CONTROL STEXT;
  20.  
  21. #
  22. ****
  23. #
  24. # *** AVRT *** #
  25. DEF AVRTMAX$ # 9 #; #AVRT UPPER BOUND = 10 PRUS #
  26. DEF RDWRITE$ # 0 #; #READ-TYPE: READ FOR A WRITE #
  27. DEF RDREAD$ # 1 #; # READ FOR READ DATA #
  28. DEF RDSS$ # 2 #; # READ FOR A SERIAL SEARCH #
  29. DEF MARKED$ # 5 #; # TYPE 0 CONVERTED TO MARKED$ AFTER PROCD #
  30. # *** READLIST *** #
  31. DEF RLMAX$ # 10 #; #READLIST UPPER BOUND (ALSO BOUNDS AVRT) #
  32. # *** VCB FILE *** #
  33. DEF VBESIZ$ # 8 #; # VCB ENTRY SIZE #
  34. DEF VBMXENTRY$ # 7 #; # MAX NO OF VCB ENTRIES PER PRU #
  35. DEF VBRECD$ # 56 #; # VCB RECORD = VBMXENTRY X VBESIZ$ #
  36. DEF VBRECD1$ # 55 #; # VBRECD1$ = VBRECD$ - 1 #
  37. DEF VBRECDCW$ # 58 #; # VBRECDCW$ = VBRECD$ + 2 CONTROL WORDS #
  38. DEF VBRECDCW1$ # 57 #; # VBRECDCW1$ = VBRECDCW$ - 1 #
  39. DEF VBBL$ #280 #; # BLOCK LEN = VBMXENTRY$ X VBESIZ$ X 5 #
  40. DEF VBLNEOR$ # 0 #; # LEVEL NUMBER = EOR #
  41. DEF VBFETSIZ$ # 7 #; # VCB FET SIZE: L FIELD = VBFETSIZ$ - 5 #
  42. DEF VBBUFLIM$ #291 #; # CIO BUF UPPER BOUND = 5 X VBRECDCW$ + 1 #
  43. DEF PRUSIZ$ # 64 #; # PRU SIZE#
  44. DEF MAXSEC$ #214 #; # MAX NUMBER OF SECTORS PER TRACK #
  45. # *** VOT AND VDT (SEE NVFIIVT) *** #
  46. DEF MAXENSEC$ # 8 #; # MAX ENTRIES/SECTOR #
  47. DEF ACTENSEC$ # 7 #; # ACTUAL ENTRIES/SECTOR = VBMXENTRY$ #
  48. DEF BITSWORD$ # 48 #; # USEFUL BITS/WORD IN BITMAP #
  49. DEF VTSIZE$ # 35 #; # VOT AND VDT TABLE SIZE #
  50. # = WRDS IN *NVFIIVT* #
  51. DEF DFILE$ # 0 #; # MESSAGE OPTION - DAYFILE #
  52. DEF VALID$ # 0 #; # MARK DATA IN *VDT* VALID INDICATOR #
  53. DEF INVALID$ # 1 #; # MARK DATA IN *VDT* INVALID INDICATOR #
  54. # *** AVST *** #
  55. DEF AVSTSIZ$ # 3 #; # AVST ENTRY SIZE #
  56. DEF MAXSSRD$ # 5 #; # MAX NO OF VCB BLOCKS READ AT A TIME #
  57. #
  58. ****
  59. #
  60.  
  61. #
  62. ** VCBIO - A COMMON BLOCK FOR VCB I/O PROCESSING.
  63. *
  64. * VCBIO IS A COMMON BLOCK OF DATA/DATA-STORAGE TO BE USED
  65. * FOR ALL OF THE VCB I/O PROCESSING ROUTINES.
  66. #
  67.  
  68.  
  69. COMMON VCBIO;
  70. BEGIN # VCBIO #
  71.  
  72. #
  73. ** TVRQ - TEMPLATE FOR VCB READ REQUEST QUEUE.
  74. *
  75. * TVRQ IS THE TEMPLATE FOR THE ABH PORTION (WORD ONE) OF A VCB ENTRY
  76. * IT CONTAINS ONLY THOSE FIELDS NEEDED BY NVF ACCESS VCB PROCESS.
  77. #
  78.  
  79. BASED ARRAY TVRQ[00:00] S(1);
  80. BEGIN
  81. ITEM TVR$WORD U(00,00,60); #FULL WORD REFERENCE #
  82. ITEM TVR$TYPE U(00,00,06); #READ REQUEST TYPE #
  83. ITEM TVR$ORD U(00,06,12); #VCB ORDINAL #
  84. ITEM TVR$RPA U(00,06,09); #RELATIVE PRU ADDRESS #
  85. ITEM TVR$ENTRY U(00,15,03); #ENTRY NO WITHIN THE PRU #
  86. ITEM TVR$QADDR U(00,18,18); #QUEUE ADDRESS #
  87. END
  88.  
  89.  
  90. #
  91. ** AVRT AND READLIST- ACTIVE-VCB-READ-REQUEST-TABLE AND VCB READLIST.
  92. *
  93. * AVRT CONTAINS VCB READ REQUEST(S) THAT IS CURRENTLY BEING PROCESSE
  94. * IT IS A FIXED SIZE TABLE WITH ONE WORD PER ENTRY.
  95. * ITS FIELDS ARE: 1) VCB ORDINAL WHICH IS COMPOSED OF:
  96. * A) RELATIVE PRU ADDRESS, AND
  97. * B) ENTRY NUMBER WITHIN THE PRU.
  98. * 2) READ REQUEST TYPE:
  99. * A) 0 = READ FOR A WRITE,
  100. * 5 = TYPE 0 CONVERTED TO 5 AFTER ITS BEEN
  101. * PROCESSED. USED MERELY BY *NVFVDCD*
  102. * WHEN SCANING THROUGH *AVRT*.
  103. * B) 1 = READ FOR READING OF DATA, AND
  104. * C) 2 = READ FOR A SERIAL SEARCH.
  105. * 3) QUEUE ADDRESS FOR THE DESTINATION OF DATA.
  106. * NOTE: FOR READ REQUEST TYPE = 0, THIS FIELD
  107. * IS IMMATERIAL.
  108. *
  109. * PRIOR TO ISSUEING THE READLS FUNCTION, AVRT WILL BE SORTED INTO
  110. * ASCENDING ORDER BY THE ENTIRE ENTRY. THIS PROVIDES MORE EFFICIENT
  111. * I/O PROCESSING AND ALSO GUARANTEES WRITE (TYPE 0) PRIORITY OVER
  112. * READ (TYPE 1).
  113. *
  114. * READLIST IS THE ACTUAL READ LIST USED BY THE CIO READLS FUNCTION..
  115. * IT CONTAINS ONLY NON-DUPLICATED RELATIVE PRU ADDRESS PORTION OF
  116. * THE SORTED AVRT.
  117. *
  118. *
  119. * THE FOLLOWING IS THE FORMAT OF AN AVRT ENTRY. EACH ENTRY
  120. * IS 1-WORD LONG.
  121. *
  122. *
  123. * 1 2 3 4 5
  124. * 012345678901234567890123456789012345678901234567890123456789
  125. *TEXT
  126. *T,9/RPA,3/EN,6/TYPE,18/QADDR,24/
  127. *ENDTEXT
  128. #
  129.  
  130.  
  131. ARRAY AVRT[00:AVRTMAX$] S(1);
  132. BEGIN
  133. #
  134. ****
  135. #
  136. ITEM AVR$WORD U(00,00,60); #FULL WORD REFERENCE #
  137. ITEM AVR$REQ U(00,00,18); #VCB REQUEST = ORD + TYPE #
  138. ITEM AVR$ORD U(00,00,12); #VCB ORDINAL #
  139. ITEM AVR$RPA U(00,00,09); #RELATIVE PRU ADDRESS #
  140. ITEM AVR$ENTRY U(00,09,03); #ENTRY NUM WITHIN THE PRU #
  141. ITEM AVR$TYPE U(00,12,06); #READ REQUEST TYPE #
  142. ITEM AVR$QADDR U(00,18,18); #QUEUE ADDRESS #
  143. #
  144. ****
  145. #
  146. END
  147.  
  148. #
  149. ** THE FOLLOWING IS THE FORMAT OF A READLIST ENTRY. EACH
  150. * ENTRY IS 1-WORD LONG.
  151. *
  152. *
  153. * 1 2 3 4 5
  154. * 012345678901234567890123456789012345678901234567890123456789
  155. *TEXT
  156. *T,60/RPA
  157. *ENDTEXT
  158. #
  159.  
  160. ARRAY READLIST[00:RLMAX$] S(1);
  161. BEGIN
  162. #
  163. ****
  164. #
  165. ITEM RL$RPA U(00,00,60); #RELATIVE PRU ADDRESS #
  166. #
  167. ****
  168. #
  169. END
  170.  
  171. ITEM AVCOUNT I; #CURRENT COUNT OF NO OF ENTRIES IN AVRT #
  172. ITEM RLCOUNT I; #CURRENT COUNT OF NO OF PRUS IN READLIST #
  173.  
  174.  
  175. #
  176. **
  177. *E
  178. ** AVST - ACTIVE-VCB-SERIAL-SEARCH-REQUEST-TABLE.
  179. *
  180. * AVST CONTAINS VCB SERIAL-SEARCH REQUEST(VSQ ENTRY) WITH ADDITIONAL
  181. * DATA THAT IS CURRENTLY BEING PROCESSED.
  182. * IT IS A FIXED-SIZE TABLE.
  183. *
  184. *
  185. * THE FOLLOWING IS THE FORMAT OF AN AVST ENTRY. EACH ENTRY
  186. * IS 3-WORDS LONG.
  187. *
  188. *
  189. * 1 2 3 4 5
  190. * 012345678901234567890123456789012345678901234567890123456789
  191. *TEXT
  192. *T,WORD0,36/,3/RC,12/VCBLK,6/WORDP,1/ ,1/M,1/S
  193. *T,WORD1,60/VALUE
  194. *T,WORD2,60/MASK
  195. *ENDTEXT
  196. #
  197.  
  198. ARRAY AVST[00:00] S(AVSTSIZ$);
  199. BEGIN
  200. #
  201. ****
  202. #
  203. ITEM AVS$WORD0 U(00,00,60); # WORD 0 REFERENCE #
  204. ITEM AVS$WORD1 U(01,00,60); # WORD 1 REFERENCE #
  205. ITEM AVS$WORD2 U(02,00,60); # WORD 2 REFERENCE #
  206. ITEM AVS$APENDF B(00,35,01); # LAST APPL FLAG #
  207. ITEM AVS$RSSCNT U(00,36,03); # READ-SS-COUNT #
  208. ITEM AVS$VCBLK U(00,39,12); # NEXT VCB BLOCK TO READ #
  209. ITEM AVS$WORDP U(00,51,06); # WORD-POSITION #
  210. ITEM AVS$MTCHF B(00,58,01); # VCB-MATCH-FLAG #
  211. ITEM AVS$SGLEF B(00,59,01); # SINGLE-ENTRY-FLAG #
  212. ITEM AVS$VALUE U(01,00,60); # VALUE TO SEARCH #
  213. ITEM AVS$MASK U(02,00,60); # MASK FOR THE VALUE #
  214. #
  215. ****
  216. #
  217. END
  218.  
  219.  
  220. #
  221. ** VOT AND VDT - VCB ORDINAL TABLE AND
  222. * VCB VALD DATA INDICATOR TABLE.
  223. *
  224. * VOT AND VDT CONTAINS STATUS INFORMATION OF VCB ORDINAL
  225. * AND VCB DATA RESPECTIVELY. BOTH TABLES ARE IN BIT MAP
  226. * FORMAT WITH 48 BITS/WORD (BITS 12 - 59) OF POSSIBLE
  227. * INFORMATION, AND THERE IS A ONE-ONE CORRESPONDENCE
  228. * BETWEEN THE TWO TABLES, I.E. THE ITH BIT IN THE NTH
  229. * WORD IN BOTH TABLES STANDS FOR THE SAME VCB ORDINAL.
  230. * VOT CONTAINS THE STATUS FREE/BUSY OF ALL VCB ORDINALS,
  231. * WHILE VDT CONTAINS THE STATUS INVALD/VALID OF ALL VCB DATA.
  232. #
  233.  
  234. ARRAY VOT[00:VTSIZE$] S(1);
  235. BEGIN
  236. ITEM VOT$WORD U(00,00,60); # FULL WORD REFERENCE #
  237. END
  238.  
  239. ITEM AVCBCNT I; # COUNT FOR ACTIVE VCB ORDINALS IN VOT #
  240.  
  241.  
  242. ARRAY VDT[00:VTSIZE$] S(1);
  243. BEGIN
  244. ITEM VDT$WORD U(00,00,60); # FULL WORD REFERENCE #
  245. END
  246.  
  247.  
  248. #
  249. * DAYFILE MESSAGE ARRAY: "ILLEGAL VCB ORDINAL = XXX"
  250. #
  251.  
  252. ARRAY VCBMSG[00:00] S(4);
  253. BEGIN
  254. ITEM V$MSG C(00,00,22);
  255. ITEM V$ORD C(02,12,03);
  256. ITEM V$SPC C(02,30,01) = [" "];
  257. ITEM V$PID C(02,36,07);
  258. ITEM V$ZERO C(03,18,42) = [0]; # ZERO BYTE TERMINATOR #
  259. END
  260.  
  261.  
  262. #
  263. ** VCBFET AND VCBBUFR - FET AND CIRCULAR BUFFER FOR THE VCB.
  264. *
  265. * THE VCB FET AND CIRCULAR BUFFER ARE DEFINED IN A GLOBAL LABELLED
  266. * COMMON AREA BECAUSE THE VCB IS USED BY BOTH THE INITIALIZATION
  267. * ROUTINES AND BY THE VCB ROUTINES. THESE ARRAYS ARE COMPILED
  268. * INTO A TEXT. HENCE, ALL PRESETTING MUST BE DONE AT INITIALIZATION
  269. * TIME.
  270. #
  271.  
  272. ARRAY VCBFET [00:00] S(VBFETSIZ$);
  273. BEGIN
  274. ITEM VB$WORD U(00,00,60); #FIRST WORD OF FET #
  275. ITEM VB$LFN C(00,00,07); #FILE NAME-- WILL BE *VCB* #
  276. ITEM VB$LNAT U(00,42,08); #COMB LEVEL NR AND ABN TERM CODE#
  277. ITEM VB$CODE U(00,50,10); #CIO FUNCTION CODE #
  278. ITEM VB$CBIT B(00,59,01); #FUNCTION COMPLETE BIT #
  279. ITEM VB$R B(01,12,01); #RANDOM ACCESS FLAG #
  280. ITEM VB$L U(01,36,06); #FET LENGTH IN EXCESS OF 5 WORDS#
  281. ITEM VB$FIRST U(01,42,18); #ADDRESS OF FIRST WORD OF BUFFER#
  282. ITEM VB$IN U(02,42,18); #NEXT DATA IN POINTER #
  283. ITEM VB$OUT U(03,42,18); #NEXT DATA OUT POINTER #
  284. ITEM VB$LIMIT U(04,42,18); #LAST WORD ADDRESS + 1 OF BUFFER#
  285. ITEM VB$LA U(05,42,18); #LIST ADDRESS #
  286. ITEM VB$W B(06,30,01); # WRITE-IN-PLACE OPERATION #
  287. ITEM VB$RR U(06,31,29); #RANDOM REQUEST RELATIVE PRU ADR#
  288. END
  289.  
  290. ARRAY VCBBUFR [00:VBBUFLIM$] S(1);
  291. BEGIN
  292. ITEM VBR$WORD U(00,00,60); #FULL WORD REFERENCE #
  293. END
  294.  
  295. #
  296. ** VCBWSA - WORKING STORAGE AREA FOR 1 PRU OF VCB DATA.
  297. *
  298. * VCBWSA IS THE WORKING STORAGE AREA FOR 1 PRU OF VCB DATA.
  299. * THE PRU IS READ IN BY *NVFVDCD* FROM CIO BUFFER WHICH IS
  300. * READ IN BY THE READLS FUNCTION ISSUED BY *NVFVRVF*.
  301. #
  302.  
  303. ARRAY VCBWSA[01:VBMXENTRY$] S(VBESIZ$);
  304. BEGIN
  305. ITEM VBW$WORD U(00,00,60); # FULL WORD REFERENCE #
  306. ITEM VBW$ORD U(00,48,12); # VCB ORDINAL #
  307. ITEM VBW$RPA U(00,48,09); # RELATIVE PRU ADDRESS #
  308. ITEM VBW$ENTRY U(00,57,03); # ENTRY NO WITHIN THE PRU #
  309. END
  310.  
  311.  
  312. END # VCBIO #
  313.  
  314. END # TXVCBNV #
  315.  
  316. TERM
cdc/nos2.source/nam5871/txvcbnv.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator