*DECK XSAPPRC
USETEXT NIPDEF
USETEXT FLIST
USETEXT OVERLAY
USETEXT PARAMS
USETEXT SWAPIN
PROC XSAPPRC(SENTRY,RC);
STARTIMS;
#
*1DC XSAPPRC
*
* 1. PROC NAME AUTHOR DATE
* XSAPPRC E. GEE 77/08/10
*
* 2. FUNCTIONAL DESCRIPTION.
* PROCESS RETURN CODE FROM SCP SWAPIN REQUEST FRO (NO ACB) APP
*
* 3. METHOD USED.
* CHECK IF APP SWAPPED OUT AGAIN. IF SO, ISSUE ANOTHER SWAPIN.
* ELSE, DELINK SWAPIN ENTRY FROM CHAIN AND RELEASE.
*
* 4. ENTRY PARAMETERS.
* SENTRY ADDR OF (NO ACB) SWAPIN ENTRY
* RC RETURN CODE FROM SCP SWAPIN REQUEST
*
* 5. EXIT PARAMETERS.
* NONE
*
* 6. COMDECKS CALLED AND SYMPL TEXT USED.
* FLIST NIPDEF OPSIZE OVERLAY
* PARAMS SWAPIN
*
* 7. ROUTINES AND OVERLAYS CALLED.
* MRELS RELEASE BUFFER SPACE
* OSWAPIN SWAPIN APPLICATION
* OVLCALL LOAD AND EXECUTE OVERLAY
* XSAPPDL OVL DELINK (NO ACB) SWAPIN ENTRY
* XTRACE RECORD PROCEDURE CALLS
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
*
* THIS PROGRAM IS PART OF A PRIAMRY OVERLAY LOADED BY SUBROUTINE
* OVLCALL.
*
* W A R N I N G - THIS PROCEDURE PLUS PROGRAM XSAPP
* CANNOT EXCEED THE PRIMARY
*CALL OPSIZE
* THIS PROCEDURE IS CALLED BY XSAPP.
#
STOPIMS;
#
EXTERNAL VARIABLES
#
XREF
BEGIN
PROC MRELS; # RELEASE BUFFER SPACE #
PROC OSWAPIN; # ISSUE SF.SWPI SCP FUNCTION #
PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
PROC XTRACE;
END
# INPUT PARAMETERS #
ITEM SENTRY; # ADDR OF (NO ACB) SWAPIN ENTRY #
ITEM RC; # RETURN CODE FROM SCP SWAPIN REQUEST #
# OUTPUT PARAMETERS #
# NONE #
#**********************************************************************#
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("APPRC") ;
CONTROL FI;
#
PROCESS RETURN CODE FROM SYSTEM CONTROL POINT CALL FOR (NO ACB)
APPLICATION
#
P<SWPIE> = SENTRY; # ADDR OF (NO ACB) SWAPIN ENTRY #
IF RC EQ RCSWAPPEDOUT
OR RC EQ RCSWAPDELAY
THEN # APP IS SWAPPED OUT AGAIN #
BEGIN
SWPIRC[0] = 0; # ZERO SCP RETURN CODE #
SWPICB[0] = 0; # CLEAR SCP CALL COMPLETION BIT #
P<FLE> = LOC(SWPIFW[0]);
OSWAPIN(FLE); # SWAPIN APP AGAIN #
END
ELSE # DO NOT NEED TO REISSUE SYS CON PT CALL #
BEGIN
PARAMS1 = SENTRY; # ADDR OF (NO ACB) SWAPIN ENTRY TO DELINK #
OVLNAME = XSAPPDLP; # NAME OF OVERLAY TO LOAD #
OVLCALL; # LOAD AND EXECUTE OVERLAY #
IF SWPIWR[0] NQ 0
THEN # THERE WAS DATA BLK TO WRITE TO APP FL #
MRELS(SWPIWR[0]); # RELEASE DATA BLOCK #
MRELS(SENTRY); # RELEASE (NO ACB) SWAPIN ENTRY #
END
RETURN;
END
TERM