cdc:nos2.source:nam5871:hwraval
Table of Contents
HWRAVAL
Table Of Contents
- [00008] PROC HWRAVAL(ACBADR, CHECK)
- [00065] PROC OSCCALL
- [00066] PROC OSCHAPP
- [00067] PROC OTIME
- [00068] PROC XTRACE
Source Code
- HWRAVAL.txt
- *DECK HWRAVAL
- USETEXT NIPDEF
- USETEXT ACB
- USETEXT AT
- USETEXT SCPCOM
- USETEXT STATTAB
- USETEXT SYSTIME
- PROC HWRAVAL(ACBADR, CHECK); # WRITE DATA AVAIABLE WORD #
- *IF DEF,IMS
- #
- *1DC HWRAVAL
- *
- * 1. PROC NAME AUTHOR DATE.
- * HWRAVAL P.C.TAM 79/02/09
- *
- * 2. FUNCTIONAL DESCRIPTION.
- * WRITE DATA AVAILABLE WORD
- *
- * 3. METHOD USED.
- * IF APP NOT SWAPPED OUT,
- * SET UP SCP REQUEST, CALL OSCALL FOR SCP SERVICE.
- * IF RETURN CODE NOT ZERO,
- * SCHEDULE APP, SET ATU FLAG.
- *
- * 4. ENTRY PARAMETER.
- * ACBADR ADDRESS OF THE ACB OF APP TO WHOM
- * NIP HAS TO WRITE DATA AVAILABLE WORD
- * CHECK CHECK OR NOT CHECK OF ACB IN SWAPPED
- * OUT STATE
- *
- * 5. EXIT PARAMETER.
- * NONE.
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
- * NIPDEF ACB SCPCOM PT AT
- * STATTAB
- *
- * 7. ROUTINES CALLED.
- * OSCHAPP SCHEDULE APP
- * OSCCALL SCP SERVICE REQUEST
- * OTIME GET SYSTEM RTIME
- * XTRACE TRACE PROCEDURE CALL
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT MESSAGES.
- * THIS PROCEDURE IS CALLED BY BDELINK,BLINK, AND XSACB.
- *
- #
- *ENDIF
- #
- INPUT PARAMETERS
- #
- ITEM
- ACBADR, # ACB ADDRESS #
- CHECK B; # CHECK OR NO CHECK FLAG #
- #
- OUTPUT PARAMETERS
- #
- # NONE #
- #
- EXTERNAL VARIABLES
- #
- XREF
- BEGIN
- PROC OSCCALL; # SCP REQUEST SERVICE #
- PROC OSCHAPP; # SCHEDULE APPLICATION #
- PROC OTIME; # GET SYSTEM RTIME #
- PROC XTRACE; # TRACE PROCEDURE CALLS #
- END
- #
- LOCAL VARIABLES
- #
- ITEM
- RC, # REASON CODE #
- I; # TEMPORARY VARIABLE #
- CONTROL IFEQ STAT,1;
- ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME #
- BEGIN
- ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
- END
- ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
- BEGIN
- ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
- END
- ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
- CONTROL FI;
- # ******************************************************************* #
- BEGIN
- CONTROL IFEQ DEBUG,1;
- XTRACE("HWRAV") ;
- CONTROL FI ;
- CONTROL IFEQ STAT,1;
- OTIME(STIME); # GET SYSTEM TIME AT BEGINNING OF PROC #
- CONTROL FI;
- P<ACB> = ACBADR ; # SET ACB ADDRESS #
- I = ACBAN[0]; # APPLICATION NUMBER #
- IF NOT ATNVFN[I] # NOT WAITING FOR NET/OFF/N #
- AND NOT ATNVFF[I] # NOT WAITING FOR FAIL/APPL/N #
- THEN
- BEGIN
- IF NOT CHECK # NO CHECK FOR ACB SWAPPED OUT STATE #
- OR (ATASBI[I] AND # SCP SWAPIN REQUEST HAS BEEN ISSUED AND #
- ACBSCPCB[0] NQ 0) # HAS COMPLETED #
- OR NOT (ATU[I] OR # NOT HWRAVAL DETECTED SWAPPED OUT APP #
- ATASBSO[I]) # NOT APPLICATION SWAPPED OUT #
- THEN # OKAY TO USE ACB FOR SF.WRITE SCP FUNCT #
- BEGIN # NEED TO MODIFY DATA AVAILABLE WORD #
- ACBSWAPWR[0] = ACBIASCP[0]; # SCP FUNCTION REQUEST WORD #
- P<SCPCALL> = LOC(ACBSWAPWR[0]);
- OSCCALL(SCPCALL);
- RC = ACBSCPRC[0]; # REPLY CODE #
- IF RC NQ 0
- THEN
- BEGIN
- ATU[I] = TRUE; # UPDATE DATA AVAILABLE WORD #
- OSCHAPP(ACBADR);
- END
- ELSE
- BEGIN # SUCCESSFUL UPDATE RC=0 #
- IF ATASBW[I] # APPLICATION IN NETWAIT STATE #
- THEN
- BEGIN # APPLICATION HAS TO BE AT CONTROL POINT #
- MSG$AN = I; # STORE AT INDEX IN GLOBAL MSG$AN #
- ATAMSG[I] = TRUE; # FLAG MESSAGE FOR APPLICATION #
- END
- END
- END
- ELSE
- ATU[I] = TRUE; # UPDATE DATA AVAILABLE FLAG #
- END
- CONTROL IFEQ STAT,1;
- OTIME(ETIME); # GET SYSTEM TIME AT END OF PROC #
- ST$NDA = ST$NDA + 1; # INCREMENT NUMBER OF TIMES HWRAVAL CALLED#
- STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN THIS ROUTINE #
- ST$TDA = ST$TDA + STTEMP; # TOTAL TIME SPENT IN THIS ROUTINE #
- IF ST$LDA LS STTEMP
- THEN # FOUND LARGER TIME INTERVAL IN ROUTINE #
- BEGIN
- ST$LDA = STTEMP; # NEW LARGEST TIME INTERVAL #
- END
- CONTROL FI;
- RETURN; # RETURN TO CALLER #
- END
- TERM
cdc/nos2.source/nam5871/hwraval.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator