*DECK HRELPWL
USETEXT NIPDEF
USETEXT ACB
USETEXT APPSTAT
USETEXT FREETAB
PROC HRELPWL; # RELEASE USED PORTION OF THE NWL #
STARTIMS;
#
*1DC HRELPWL
*
* 1. PROC NAME AUTHOR DATE
* HRELPWL P.C.TAM 78/03/15
*
* 2. FUNCTIONAL DESCRIPTION.
* RELEASE USED PORTION OF THE WORKLIST.
*
* 3. NETHOD USED.
* GET FIRST WORD ADDRESS OF BLOCK TO BE RELEASED FROM ACBWLFWA.
* GET LAST WORD ADDRESS OF BLOCK FROM WLADDR.
* SET BLKSIZE.
* RELEASE BLOCK.
* UPDATE ACBWLFWA TO NEXT WORKLIST ENTRY
*
* 4. ENTRY PARAMETERS.
* NEXTWLA ADDRESS OF NEXT NWL ENTRY
* ACBADDR ACB ADDRESS OF CURRENT APPLICATION
* WLADDR ADDRESS OF CURRENT NWL ENTRY
*
* 5. EXIT PARAMETERS.
* NONE.
*
* 6. COMDECKS CALLED AND SYMPL TEXTS USED.
* APPSTAT FREETAB NIPDEF ACB
*
* 7. ROUTINES CALLED.
* MRELS RETURN BLOCK TO FREE BUFFER CHAIN
* XTRACE DEBUG TRACE
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
* THIS PROCEDURE IS CALLED BY HPGTF,HPPUT, AND KHOPDIS.
*
#
STOPIMS;
#
EXTERNAL VARIABLES
#
XREF
BEGIN
PROC MRELS;
PROC XTRACE; # SAVE RETURN ADDRESS #
END
#
INTERNAL VARIABLES
#
ITEM TEMP;
# *********************************************************************#
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("HRELP") ;
CONTROL FI;
P<ACB> = ACBADDR;
P<FREEBUF> = ACBWLFWA[0]; # SET NWL ADDRESS #
TEMP = WLADDR - P<FREEBUF>; # GET SIZE #
IF TEMP NQ 0
THEN # THERE IS USED WLL PORTION #
BEGIN
FRBBS[0] = TEMP; # SET BLOCK SIZE #
MRELS(P<FREEBUF>); # RELEASE UNUSED PORTION #
END
P<FREEBUF> = NEXTWLA; # SET BASE TO NEW NWL PORTION #
FRBID[0] = NWLEIDVALUE; # SET ID OF NWL ENTRY #
ACBWLFWA[0] = NEXTWLA;
END # HRELPWL #
TERM