*DECK NVFUROS
USETEXT TXVCBNV
PROC NVFUROS(VCBORD,STATS);
# TITLE NVFUROS - RETURNS VCB ORDINAL STATUS(FREE/BUSY). #
BEGIN # NVFUROS #
#
** NVFUROS - RETURNS VCB ORDINAL STATUS(FREE/BUSY).
*
* A. LIM 81/07/21
* C. BRION 82/06/22
*
* THIS PROCEDURE RETURNS THE STATUS(FREE/BUSY) OF VCB ORDINAL.
*
* PROC NVFUROS(VCBORD,STATS)
*
* ENTRY VCBORD = VCB ORDINAL
*
* EXIT STATS = STATUS OF VCB ORDINAL
* 1 = FREE, AND 0 = BUSY.
*
* NOTES NONE
*
* METHOD 1) VERIFY IF VCB ORDINAL IS LEGAL.
* IF NOT, ISSUE DAYFILE MESSAGE, AND
* ABORT NVF. ELSE RETURN THE STATUS
* OF VCB ORDINAL.
*
#
#
**** PROC NVFUROS XREF LIST BEGIN.
#
XREF
BEGIN
PROC ABORT; # MACREL - ABORT TASK #
PROC MESSAGE; # MACREL - ISSUE MESSAGE #
PROC SSBTBW; # SS - TEST BIT IN WORD #
FUNC XCDD C(10); # MACREL-CNVRT INT TO DEC DSP CD#
END
#
****
#
# FORMAL PARAMETERS #
ITEM VCBORD I;
ITEM STATS B;
# ACTUAL PARAMETERS #
ITEM WORD I;
ITEM BITN I;
# INDUCTION VARIABLES #
ITEM I I; # DUMMY #
# ITEMS #
ITEM TEMP C(10);
WORD = 0;
BITN =VCBORD;
FOR I = 0 WHILE (BITN-48) GR 0 # CONVERT ORDNL TO WORD/BIT #
DO
BEGIN
BITN = BITN -48;
WORD = WORD + 1;
END
# VERIFY VCB ORDINAL #
$BEGIN
IF WORD GR VTSIZE$
OR (BITN - BITN/MAXENSEC$ * MAXENSEC$) EQ 0
OR (BITN - BITN/MAXENSEC$ * MAXENSEC$) GR ACTENSEC$
THEN
BEGIN
TEMP = XCDD(VCBORD);
V$MSG[0] = "ILLEGAL VCB ORDINAL = ";
V$ORD[0] = C<7,3>TEMP;
V$PID[0] = "NVFUROS";
MESSAGE(VCBMSG[0],DFILE$);
ABORT;
END
$END
SSBTBW(VOT[WORD],BITN,STATS); # GET STATUS OF VCB ORDINAL #
RETURN;
END # NVFUROS #
TERM