*DECK NVFACTC
USETEXT TEXTNVF
USETEXT TEXTSS
PROC NVFACTC(PACOUT,RELVCB);
# TITLE - NVFACTC - CLEAN UP TERMINATING A-A CONNECTION TABLES. #
BEGIN # NVFACTC #
#
** NVFACTC - CLEAN UP TERMINATING A-A CONNECTION TABLES.
*
* C. BRION 83/11/08.
* P. MURRAY 84/02/28.
*
* THIS PROCEDURE IS RESPONSIBLE FOR RELEASING ACTIVE PID TABLE
* SPACE IF IT EXISTS, APOUTCL TABLE SPACE IF IT EXISTS, PAAC ENTRY
* TABLE SPACE, AND THE ASSIGNED VCB ORDINAL FOR A TERMINATING A-A
* CONNECTION.
*
* PROC NVFACTC(PACOUT,RELVCB)
*
* ENTRY:
*
* PACOUT = INDEX ORDINAL OF PAAC ENTRY FOR A-A CONNECTION.
* RELVCB = FLAG INDICATING IF VCB TO BE RELEASED.
*
* EXIT:
*
* THE ACTIVE PID TABLE ENTRY (ACPID ENTRY) IS RELEASED IF
* IT EXISTS.
*
* THE APPL SUPPLIED OUTCALL TABLE ENTRY (APOUTCL) IS RELEASED
* IF IT EXISTS.
*
* THE PAAC TABLE ENTRY SPACE IS RELEASED.
*
* THE ASSIGNED VCB ORDINAL MAY BE RELEASED.
*
#
CONTROL EJECT;
#
**** PROC NVFACTC XREF LIST
#
XREF
BEGIN
PROC SSTRTS; # SS-RELEASE TABLE SPACE #
PROC NVFUFVO; # FREE VCB ORDINAL #
END
#
****
#
ITEM PACOUT I; # PAAC ENTRY ORDINAL #
ITEM VCBOUT I; # VCB ORDINAL #
ITEM WORK I; # WORK VARIABLE #
ITEM SIZE I; # SIZE OF TABLE #
ITEM FOUND B; # TABLE ENTRY FOUND FLAG #
ITEM RELVCB B; # VCB RELEASE FLAG #
CONTROL EJECT;
#
* OBTAIN VCB ORDINAL FROM PAAC ENTRY.
#
VCBOUT = PA$VCB[PACOUT];
#
* IF AN ACPID TABLE ENTRY EXISTS FOR THIS PAAC ENTRY, LOCATE AND
* RELEASE THE ENTRY SPACE.
#
IF PA$ACPIDL[PACOUT] NQ 0
THEN
BEGIN
FOUND = FALSE;
FOR WORK = 0 STEP ACP$ESIZ[WORK] WHILE
WORK LS ACPIDL AND NOT FOUND
DO
BEGIN
IF ACP$VCB[WORK] EQ VCBOUT
THEN
BEGIN
FOUND = TRUE;
SIZE = ACP$ESIZ[WORK];
SSTRTS(P<ACPID>,WORK,SIZE);
END
END
END
#
* IF AN APOUTCL ENTRY EXISTS FOR THIS PAAC ENTRY, LOCATE AND
* RELEASE THE ENTRY SPACE.
#
IF PA$OUTSPEC[PACOUT]
THEN
BEGIN
FOUND = FALSE;
FOR WORK = 0 STEP APO$WC[WORK] WHILE
WORK LS APOUTCLL AND NOT FOUND
DO
BEGIN
IF APO$VCB[WORK] EQ VCBOUT
THEN
BEGIN
FOUND = TRUE;
SIZE = APO$WC[WORK];
SSTRTS(P<APOUTCL>,WORK,SIZE);
END
END
END
#
* RELEASE THE PAAC ENTRY AND THE VCB ORDINAL IF REQUESTED.
#
WORK = PACOUT * PAACSIZ$;
SSTRTS(P<PAAC>,WORK,PAACSIZ$);
IF RELVCB
THEN
NVFUFVO(VCBOUT);
END # NVFACTC #
TERM