*DECK OSCHAPP
USETEXT NIPDEF
USETEXT ACB
USETEXT AT
USETEXT SYSTIME
PROC OSCHAPP(ACBAD); # SCHEDULE AN APPLICATION #
STARTIMS;
#
*1DC OSCHAPP
*
* 1. PROC NAME AUTHOR DATE
* OSCHAPP P.C.TAM 80/02/06
*
* 2. FUNCTIONAL DESCRIPTION.
* THIS ROUTINE EXAMINES THE STATE OF APPLICATIONS. AN IMMEDIATE
* RETURN IS MADE FOR THOSE BEING SWAPPED IN OR THOSE EXECUTING
* NORMALLY. A *SWAP-IN* IS ISSUED FOR THOSE IN -WAIT-STATE-.
*
* 3. METHOD USED.
* IF THE APPLICATION IS IN A FORCED NETWAIT,RETURN
* CHECK SWAPIN/SWAPOUT FLAGS IN APPLICATION TABLE
* SWAPIN IF APPLICATION IS IN SWAPOUT STATUS
* UPDATE WAIT TIME IF NON-FORCED NETWAIT
*
* 4. ENTRY PARAMETERS.
* ACBAD APP CONTROL BLOCK ADDRESS
*
* 5. EXIT PARAMETERS. NONE
*
* 6. COMDECKS CALLED AND SYMPL TEXTS USED.
* ACB APPLICATION CONTROL BLOCK TEMPLATE
* AT APPLICATION TABLE
* NIPDEF CONSTANT DEFINITIONS
* SYSTIME SYSTEM TIME TABLE
*
* 7. ROUTINES CALLED.
* OSWAPIN ISSUE -SWAP IN- REQUEST
* XTRACE TRACES CALLS
*
* 8. DAYFILE MESSAGES. NONE
*
#
STOPIMS;
# ENTRY PARAMETERS. #
ITEM ACBAD U; # FWA OF APPLICATION-S ACB #
# EXIT PARAMETERS. NONE #
#
EXTERNAL VARIABLES
#
XREF BEGIN
PROC OSWAPIN; # ISSUE SWAP-IN REQUEST #
PROC XTRACE; # TRACE CALL #
END
#
INTERNAL VARIABLES
#
ITEM I; # TEMPORARY VARIABLE #
BASED ARRAY SCPPARAMS; # SCP WORD OF ACB #
ITEM SCPDUM U(0,0,60);
#**********************************************************************#
BEGIN # BEGIN EXECUTION #
CONTROL IFEQ DEBUG,1 ;
XTRACE("OSCHA") ;
CONTROL FI;
P<ACB> = ACBAD; # APP CONTROL BLOCK ADDRESS #
I = ACBAN[0]; # APP NUMBER #
P<SCPPARAMS> = LOC(ACBSWAPWR[0]);
IF NOT ATASBF[I] # APP DID NOT ISSUE FORCED NETWAIT #
THEN
BEGIN
IF ACBFNTADR[0] NQ 0 AND # APP NOT NETTED ON #
NOT ATASBI[I] AND # SWAPIN NOT ISSUED #
(ATASBSO[I] OR # APPLICATION IN SWAPPED OUT STATE #
ATU[I]) # APP SWAPPED OUT WHEN UPD DATA AVAL #
THEN
BEGIN
ACBID[0] = NONMOVEABLE; # MAKE ACB NON-MOVABLE #
ACBSWAPWR[0] = 0;
OSWAPIN(SCPPARAMS); # ISSUE SWAP-IN REQUEST #
ATASBI[I] = TRUE;
END
IF ATASBW[I] # NETWAIT BUT NOT ROLLED OUT #
THEN # UPDATE WAIT TIME TO RELEASE APP #
BEGIN
ACBNTL[0] = RTSECS[0];
END
END
END
TERM