*DECK NVFUFVO
USETEXT TXVCBNV
PROC NVFUFVO(VCBORD);
# TITLE NVFUFVO - FREES UP AN VCB ORDINAL. #
BEGIN # NVFFVO #
#
** NVFUFVO - FREES UP AN VCB ORDINAL.
*
* A. LIM 81/07/21
* C. BRION 82/06/22
*
* THIS PROCEDURE FREES UP AN VCB ORDINAL.
*
* PROC NVFUFVO(VCBORD)
*
* ENTRY VCBORD = VCB ORDINAL TO BE FREED UP.
*
* EXIT VCB ORDINAL FREED
*
* NOTES NONE
*
* METHOD 1) VERIFY THAT VCB ORDINAL IS LEGAL
* 2) VERIFY THAT VCB ORDINAL IS NOT IN PRESENT STATE.
* IF EITHER ONE OF THE ABOVE FAILS, THEN
* ISSUE DAYFILE MESSAGE, AND ABORT NVF. ELSE,
* MARK IT FREE, AND DECREMENT THE ACTIVE-VCB-COUNT(AVCBCNT)
*
#
#
**** PROC NVFUFVO XREF BEGIN.
#
XREF
BEGIN
PROC ABORT; # MACREL - ABORT TASK #
PROC MESSAGE; # MACREL - ISSUE MESSAGE #
PROC SSBSBW; # SS - SET BIT IN WORD #
PROC SSBTBW; # SS - TEST BIT IN WORD #
FUNC XCDD C(10); # MACREL-CNVRT INT TO DEC DSP CD#
END
#
****
#
# FORMAL PARAMETERS #
ITEM VCBORD I; # VCB ORDINAL #
# ACTUAL PARAMETERS #
ITEM WORD I;
ITEM BITN I;
ITEM STATS B;
# INDUCTION VARIABLES #
ITEM I I; # DUMMY #
# ITEMS #
ITEM TEMP C(10);
WORD = 0;
BITN = VCBORD;
FOR I = 0 WHILE (BITN-48) GR 0 DO # CONVERT ORDNL TO WORD/BIT #
BEGIN
BITN = BITN-48;
WORD = WORD+1;
END
#
* 1) VERIFY THAT VCB ORDINAL IS LEGAL, AND
* 2) CHECK PRESENT ORDINAL STATUS.
#
$BEGIN
SSBTBW(VOT[WORD],BITN,STATS);
IF WORD GR VTSIZE$
OR (BITN - BITN/MAXENSEC$ * MAXENSEC$) EQ 0
OR (BITN - BITN/MAXENSEC$ * MAXENSEC$) GR ACTENSEC$
OR STATS
THEN
BEGIN
TEMP = XCDD(VCBORD);
V$MSG[0] = "ILLEGAL VCB ORDINAL = ";
V$ORD[0] = C<7,3>TEMP;
V$PID[0] = "NVFUFVO";
MESSAGE(VCBMSG[0],DFILE$);
ABORT;
END
$END
SSBSBW(VOT[WORD],BITN); # MARK ORDINAL AS FREE #
AVCBCNT = AVCBCNT-1; # DECR ACTIVE VCB COUNT #
RETURN;
END # NVFUFVO #
TERM