- [00005] NVFTPVD - PREPARE TO RECEIVE VCB DATA
- [00009] PREPARE TO RECEIVE VCB DATA.
- [00042] PROC ABORT
- [00043] PROC MESSAGE
- [00044] PROC NVFUMQE
- [00045] PROC SSTATS
- NVFTPVD.txt
- *DECK NVFTPVD
- USETEXT TEXTNVF
- PROC NVFTPVD((VCB),(AN),PT);
- # TITLE NVFTPVD - PREPARE TO RECEIVE VCB DATA #
- BEGIN # NVFTPVD #
- #
- ** NVFTPVD - PREPARE TO RECEIVE VCB DATA.
- *
- * E. THAVIKULWAT 81/11/09
- * C. BRION 83/05/10
- *
- * THIS PROCEDURE'S MAIN FUNCTION IS TO PREPARE TABLES TO RECEIVE
- * VCB DATA BY ALLOCATING SPACE FOR A NEW *PTAC* ENTRY AND SETTING
- * UP THE VCB READ REQUEST. IT IS CALLED INTO EXECUTION BY THE
- * FOLLOWING PROCEDURES:
- * *NVFTCB* *NVFTRCN*
- *
- * PROC NVFTPVD((VCB),(AN),(PT))
- *
- * ENTRY:
- * VCB = VCB ORDINAL
- * AN = APPLICATION NUMBER
- *
- * EXIT:
- * PT = INDEX TO NEW PTAC ENTRY.
- * VCB READ REQUEST ENTERED IN *VRQ* QUEUE.
- *
- * METHOD:
- * CALL *SSTATS* TO ALLOCATE SPACE FOR A NEW *PTAC* ENTRY.
- * DECREMENT T-A CONNECTION COUNT AND MAKE VCB READ REQUEST ENTRY
- * IN *VRQ* QUEUE.
- #
- #
- **** PROC NVFTPVD - XREF LIST.
- #
- XREF
- BEGIN
- PROC ABORT; # ABORT JOB #
- PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
- PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
- PROC SSTATS; # ALLOCATE TABLE SPACE #
- END
- #
- ****
- #
- ITEM AN I; # APPLICATION NUMBER #
- ITEM DUMBUF I; # DUMMY TEXT AREA #
- ITEM I I; # LOOP VARIABLE #
- ITEM MATCH B; # EXIT LOOP VARIABLE #
- ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
- ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
- ITEM VCB I; # VCB ORDINAL #
- #
- * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT
- * FINDING AN EXPECTED AST ENTRY.
- #
- ARRAY DAYMSG[00:00] S(5);
- BEGIN
- ITEM DAY$MSG1 C(00,00,26) = ["NVFTPVD - CANNOT FIND AST "];
- ITEM DAY$MSG2 C(02,36,17) = ["ENTRY FOR TERMNAM"];
- ITEM DAY$TNAME C(03,36,07); # TERMINAL NAME #
- END
- #
- * THE FOLLOWING BASED ARRAY POINTER POINTS TO THE NEW PTAC ENTRY.
- #
- BASED ARRAY BPTAC[00:00] S(1);
- BEGIN
- ITEM BPT$WORD U(00,00,60); # FULL WORD REFERENCE #
- END
- #
- * ALLOCATE SPACE FOR A NEW PTAC ENTRY.
- #
- PT = PTALNGTH / PTACSIZ$; # CALCULATE NEW PTAC ENTRY ORD #
- SSTATS(P<PTAC>,PTACSIZ$); # ALLOC SPACE FOR PTAC ENTRY #
- #
- * CLEAR NEW PTAC BUFFER.
- #
- P<BPTAC> = LOC(PTAC[PT]); # POINTS TO NEW PTAC ENTRY #
- FOR I = 0 STEP 1 UNTIL (PTACSIZ$ - 1)
- DO
- BEGIN
- BPT$WORD[I] = 0;
- END
- #
- * GET *AST* ENTRY THAT MATCHES ON APPLICATION NUMBER AND DECREMENT
- * T-A CONNECTION COUNT.
- #
- MATCH = FALSE;
- NENTRY = ASTLNGTH / ASTSIZ$;
- FOR I = 0 STEP 1 WHILE (NOT MATCH AND I LS NENTRY)
- DO
- BEGIN
- IF AST$AN[I] EQ AN
- THEN # FOUND AST ENTRY #
- BEGIN
- PTA$SWTAPP[PT] = AST$ANAM[I]; # SAVE PREVIOUS APPL NAME #
- MATCH = TRUE; # EXIT LOOP #
- END
- END
- IF NOT MATCH
- THEN
- BEGIN
- DAY$TNAME[0] = PTA$TN[PT];
- MESSAGE(DAYMSG,0); # MSG TO SYSTEM AND USR DAYFILE #
- ABORT;
- END
- #
- * MAKE READ VCB FILE REQUEST ENTRY IN *VRQ* QUEUE.
- #
- NVFUMQE(P<VRQ>,DUMBUF,1,VCB,0); # READ VCB REQUEST TO *VRQ* #
- END # END NVFTPVD #
- TERM