*DECK TXVCBNV
PROC TXVCBNV;
# TITLE TXVCBNV - VCB I/O SYMPL TEXT FOR NVF. #
BEGIN # TXVCBNV #
#
** TXVCBNV - VCB I/O SYMPL TEXT FOR NVF.
*
* A. LIM. 81/11/04.
* C. BRION. 82/06/22.
*
* THIS PROC GENERATES A SYMPL TEXT FOR COMPILING NVF ACCESS VCB
* FILE ROUTINES. IT CONTAINS DEFINITIONS OF SYMBOLS, ITEMS, ARRAYS
* AND COMMON BLOCKS USED FOR THOSE ROUTINES AND VCB I/O PROCESSING.
*
* PROC TXVCBNV
#
CONTROL STEXT;
#
****
#
# *** AVRT *** #
DEF AVRTMAX$ # 9 #; #AVRT UPPER BOUND = 10 PRUS #
DEF RDWRITE$ # 0 #; #READ-TYPE: READ FOR A WRITE #
DEF RDREAD$ # 1 #; # READ FOR READ DATA #
DEF RDSS$ # 2 #; # READ FOR A SERIAL SEARCH #
DEF MARKED$ # 5 #; # TYPE 0 CONVERTED TO MARKED$ AFTER PROCD #
# *** READLIST *** #
DEF RLMAX$ # 10 #; #READLIST UPPER BOUND (ALSO BOUNDS AVRT) #
# *** VCB FILE *** #
DEF VBESIZ$ # 8 #; # VCB ENTRY SIZE #
DEF VBMXENTRY$ # 7 #; # MAX NO OF VCB ENTRIES PER PRU #
DEF VBRECD$ # 56 #; # VCB RECORD = VBMXENTRY X VBESIZ$ #
DEF VBRECD1$ # 55 #; # VBRECD1$ = VBRECD$ - 1 #
DEF VBRECDCW$ # 58 #; # VBRECDCW$ = VBRECD$ + 2 CONTROL WORDS #
DEF VBRECDCW1$ # 57 #; # VBRECDCW1$ = VBRECDCW$ - 1 #
DEF VBBL$ #280 #; # BLOCK LEN = VBMXENTRY$ X VBESIZ$ X 5 #
DEF VBLNEOR$ # 0 #; # LEVEL NUMBER = EOR #
DEF VBFETSIZ$ # 7 #; # VCB FET SIZE: L FIELD = VBFETSIZ$ - 5 #
DEF VBBUFLIM$ #291 #; # CIO BUF UPPER BOUND = 5 X VBRECDCW$ + 1 #
DEF PRUSIZ$ # 64 #; # PRU SIZE#
DEF MAXSEC$ #214 #; # MAX NUMBER OF SECTORS PER TRACK #
# *** VOT AND VDT (SEE NVFIIVT) *** #
DEF MAXENSEC$ # 8 #; # MAX ENTRIES/SECTOR #
DEF ACTENSEC$ # 7 #; # ACTUAL ENTRIES/SECTOR = VBMXENTRY$ #
DEF BITSWORD$ # 48 #; # USEFUL BITS/WORD IN BITMAP #
DEF VTSIZE$ # 35 #; # VOT AND VDT TABLE SIZE #
# = WRDS IN *NVFIIVT* #
DEF DFILE$ # 0 #; # MESSAGE OPTION - DAYFILE #
DEF VALID$ # 0 #; # MARK DATA IN *VDT* VALID INDICATOR #
DEF INVALID$ # 1 #; # MARK DATA IN *VDT* INVALID INDICATOR #
# *** AVST *** #
DEF AVSTSIZ$ # 3 #; # AVST ENTRY SIZE #
DEF MAXSSRD$ # 5 #; # MAX NO OF VCB BLOCKS READ AT A TIME #
#
****
#
#
** VCBIO - A COMMON BLOCK FOR VCB I/O PROCESSING.
*
* VCBIO IS A COMMON BLOCK OF DATA/DATA-STORAGE TO BE USED
* FOR ALL OF THE VCB I/O PROCESSING ROUTINES.
#
COMMON VCBIO;
BEGIN # VCBIO #
#
** TVRQ - TEMPLATE FOR VCB READ REQUEST QUEUE.
*
* TVRQ IS THE TEMPLATE FOR THE ABH PORTION (WORD ONE) OF A VCB ENTRY
* IT CONTAINS ONLY THOSE FIELDS NEEDED BY NVF ACCESS VCB PROCESS.
#
BASED ARRAY TVRQ[00:00] S(1);
BEGIN
ITEM TVR$WORD U(00,00,60); #FULL WORD REFERENCE #
ITEM TVR$TYPE U(00,00,06); #READ REQUEST TYPE #
ITEM TVR$ORD U(00,06,12); #VCB ORDINAL #
ITEM TVR$RPA U(00,06,09); #RELATIVE PRU ADDRESS #
ITEM TVR$ENTRY U(00,15,03); #ENTRY NO WITHIN THE PRU #
ITEM TVR$QADDR U(00,18,18); #QUEUE ADDRESS #
END
#
** AVRT AND READLIST- ACTIVE-VCB-READ-REQUEST-TABLE AND VCB READLIST.
*
* AVRT CONTAINS VCB READ REQUEST(S) THAT IS CURRENTLY BEING PROCESSE
* IT IS A FIXED SIZE TABLE WITH ONE WORD PER ENTRY.
* ITS FIELDS ARE: 1) VCB ORDINAL WHICH IS COMPOSED OF:
* A) RELATIVE PRU ADDRESS, AND
* B) ENTRY NUMBER WITHIN THE PRU.
* 2) READ REQUEST TYPE:
* A) 0 = READ FOR A WRITE,
* 5 = TYPE 0 CONVERTED TO 5 AFTER ITS BEEN
* PROCESSED. USED MERELY BY *NVFVDCD*
* WHEN SCANING THROUGH *AVRT*.
* B) 1 = READ FOR READING OF DATA, AND
* C) 2 = READ FOR A SERIAL SEARCH.
* 3) QUEUE ADDRESS FOR THE DESTINATION OF DATA.
* NOTE: FOR READ REQUEST TYPE = 0, THIS FIELD
* IS IMMATERIAL.
*
* PRIOR TO ISSUEING THE READLS FUNCTION, AVRT WILL BE SORTED INTO
* ASCENDING ORDER BY THE ENTIRE ENTRY. THIS PROVIDES MORE EFFICIENT
* I/O PROCESSING AND ALSO GUARANTEES WRITE (TYPE 0) PRIORITY OVER
* READ (TYPE 1).
*
* READLIST IS THE ACTUAL READ LIST USED BY THE CIO READLS FUNCTION..
* IT CONTAINS ONLY NON-DUPLICATED RELATIVE PRU ADDRESS PORTION OF
* THE SORTED AVRT.
*
*
* THE FOLLOWING IS THE FORMAT OF AN AVRT ENTRY. EACH ENTRY
* IS 1-WORD LONG.
*
*
* 1 2 3 4 5
* 012345678901234567890123456789012345678901234567890123456789
*TEXT
*T,9/RPA,3/EN,6/TYPE,18/QADDR,24/
*ENDTEXT
#
ARRAY AVRT[00:AVRTMAX$] S(1);
BEGIN
#
****
#
ITEM AVR$WORD U(00,00,60); #FULL WORD REFERENCE #
ITEM AVR$REQ U(00,00,18); #VCB REQUEST = ORD + TYPE #
ITEM AVR$ORD U(00,00,12); #VCB ORDINAL #
ITEM AVR$RPA U(00,00,09); #RELATIVE PRU ADDRESS #
ITEM AVR$ENTRY U(00,09,03); #ENTRY NUM WITHIN THE PRU #
ITEM AVR$TYPE U(00,12,06); #READ REQUEST TYPE #
ITEM AVR$QADDR U(00,18,18); #QUEUE ADDRESS #
#
****
#
END
#
** THE FOLLOWING IS THE FORMAT OF A READLIST ENTRY. EACH
* ENTRY IS 1-WORD LONG.
*
*
* 1 2 3 4 5
* 012345678901234567890123456789012345678901234567890123456789
*TEXT
*T,60/RPA
*ENDTEXT
#
ARRAY READLIST[00:RLMAX$] S(1);
BEGIN
#
****
#
ITEM RL$RPA U(00,00,60); #RELATIVE PRU ADDRESS #
#
****
#
END
ITEM AVCOUNT I; #CURRENT COUNT OF NO OF ENTRIES IN AVRT #
ITEM RLCOUNT I; #CURRENT COUNT OF NO OF PRUS IN READLIST #
#
**
*E
** AVST - ACTIVE-VCB-SERIAL-SEARCH-REQUEST-TABLE.
*
* AVST CONTAINS VCB SERIAL-SEARCH REQUEST(VSQ ENTRY) WITH ADDITIONAL
* DATA THAT IS CURRENTLY BEING PROCESSED.
* IT IS A FIXED-SIZE TABLE.
*
*
* THE FOLLOWING IS THE FORMAT OF AN AVST ENTRY. EACH ENTRY
* IS 3-WORDS LONG.
*
*
* 1 2 3 4 5
* 012345678901234567890123456789012345678901234567890123456789
*TEXT
*T,WORD0,36/,3/RC,12/VCBLK,6/WORDP,1/ ,1/M,1/S
*T,WORD1,60/VALUE
*T,WORD2,60/MASK
*ENDTEXT
#
ARRAY AVST[00:00] S(AVSTSIZ$);
BEGIN
#
****
#
ITEM AVS$WORD0 U(00,00,60); # WORD 0 REFERENCE #
ITEM AVS$WORD1 U(01,00,60); # WORD 1 REFERENCE #
ITEM AVS$WORD2 U(02,00,60); # WORD 2 REFERENCE #
ITEM AVS$APENDF B(00,35,01); # LAST APPL FLAG #
ITEM AVS$RSSCNT U(00,36,03); # READ-SS-COUNT #
ITEM AVS$VCBLK U(00,39,12); # NEXT VCB BLOCK TO READ #
ITEM AVS$WORDP U(00,51,06); # WORD-POSITION #
ITEM AVS$MTCHF B(00,58,01); # VCB-MATCH-FLAG #
ITEM AVS$SGLEF B(00,59,01); # SINGLE-ENTRY-FLAG #
ITEM AVS$VALUE U(01,00,60); # VALUE TO SEARCH #
ITEM AVS$MASK U(02,00,60); # MASK FOR THE VALUE #
#
****
#
END
#
** VOT AND VDT - VCB ORDINAL TABLE AND
* VCB VALD DATA INDICATOR TABLE.
*
* VOT AND VDT CONTAINS STATUS INFORMATION OF VCB ORDINAL
* AND VCB DATA RESPECTIVELY. BOTH TABLES ARE IN BIT MAP
* FORMAT WITH 48 BITS/WORD (BITS 12 - 59) OF POSSIBLE
* INFORMATION, AND THERE IS A ONE-ONE CORRESPONDENCE
* BETWEEN THE TWO TABLES, I.E. THE ITH BIT IN THE NTH
* WORD IN BOTH TABLES STANDS FOR THE SAME VCB ORDINAL.
* VOT CONTAINS THE STATUS FREE/BUSY OF ALL VCB ORDINALS,
* WHILE VDT CONTAINS THE STATUS INVALD/VALID OF ALL VCB DATA.
#
ARRAY VOT[00:VTSIZE$] S(1);
BEGIN
ITEM VOT$WORD U(00,00,60); # FULL WORD REFERENCE #
END
ITEM AVCBCNT I; # COUNT FOR ACTIVE VCB ORDINALS IN VOT #
ARRAY VDT[00:VTSIZE$] S(1);
BEGIN
ITEM VDT$WORD U(00,00,60); # FULL WORD REFERENCE #
END
#
* DAYFILE MESSAGE ARRAY: "ILLEGAL VCB ORDINAL = XXX"
#
ARRAY VCBMSG[00:00] S(4);
BEGIN
ITEM V$MSG C(00,00,22);
ITEM V$ORD C(02,12,03);
ITEM V$SPC C(02,30,01) = [" "];
ITEM V$PID C(02,36,07);
ITEM V$ZERO C(03,18,42) = [0]; # ZERO BYTE TERMINATOR #
END
#
** VCBFET AND VCBBUFR - FET AND CIRCULAR BUFFER FOR THE VCB.
*
* THE VCB FET AND CIRCULAR BUFFER ARE DEFINED IN A GLOBAL LABELLED
* COMMON AREA BECAUSE THE VCB IS USED BY BOTH THE INITIALIZATION
* ROUTINES AND BY THE VCB ROUTINES. THESE ARRAYS ARE COMPILED
* INTO A TEXT. HENCE, ALL PRESETTING MUST BE DONE AT INITIALIZATION
* TIME.
#
ARRAY VCBFET [00:00] S(VBFETSIZ$);
BEGIN
ITEM VB$WORD U(00,00,60); #FIRST WORD OF FET #
ITEM VB$LFN C(00,00,07); #FILE NAME-- WILL BE *VCB* #
ITEM VB$LNAT U(00,42,08); #COMB LEVEL NR AND ABN TERM CODE#
ITEM VB$CODE U(00,50,10); #CIO FUNCTION CODE #
ITEM VB$CBIT B(00,59,01); #FUNCTION COMPLETE BIT #
ITEM VB$R B(01,12,01); #RANDOM ACCESS FLAG #
ITEM VB$L U(01,36,06); #FET LENGTH IN EXCESS OF 5 WORDS#
ITEM VB$FIRST U(01,42,18); #ADDRESS OF FIRST WORD OF BUFFER#
ITEM VB$IN U(02,42,18); #NEXT DATA IN POINTER #
ITEM VB$OUT U(03,42,18); #NEXT DATA OUT POINTER #
ITEM VB$LIMIT U(04,42,18); #LAST WORD ADDRESS + 1 OF BUFFER#
ITEM VB$LA U(05,42,18); #LIST ADDRESS #
ITEM VB$W B(06,30,01); # WRITE-IN-PLACE OPERATION #
ITEM VB$RR U(06,31,29); #RANDOM REQUEST RELATIVE PRU ADR#
END
ARRAY VCBBUFR [00:VBBUFLIM$] S(1);
BEGIN
ITEM VBR$WORD U(00,00,60); #FULL WORD REFERENCE #
END
#
** VCBWSA - WORKING STORAGE AREA FOR 1 PRU OF VCB DATA.
*
* VCBWSA IS THE WORKING STORAGE AREA FOR 1 PRU OF VCB DATA.
* THE PRU IS READ IN BY *NVFVDCD* FROM CIO BUFFER WHICH IS
* READ IN BY THE READLS FUNCTION ISSUED BY *NVFVRVF*.
#
ARRAY VCBWSA[01:VBMXENTRY$] S(VBESIZ$);
BEGIN
ITEM VBW$WORD U(00,00,60); # FULL WORD REFERENCE #
ITEM VBW$ORD U(00,48,12); # VCB ORDINAL #
ITEM VBW$RPA U(00,48,09); # RELATIVE PRU ADDRESS #
ITEM VBW$ENTRY U(00,57,03); # ENTRY NO WITHIN THE PRU #
END
END # VCBIO #
END # TXVCBNV #
TERM