*DECK NETWTQ USETEXT AIPDEF USETEXT NP$NWL *IF,DEF,XFR USETEXT NX$ACBX *ENDIF PROC NETWTQ(NQTIME); BEGIN # *1DC NETWTQ * * 1. PROC NAME AUTHOR DATE * NETWTQ YIU YIP 07/18/85 * * 2. FUNCTIONAL DESCRIPTION. * THIS ROUTINE PERFORMS TWO TWO SECONDS NETWAIT AND * A NETWAIT FOR THE REST OF THE TIME. * * 3. METHOD USED. * IF NQTIME LQ SHORT$WAIT * THEN * NETWAIT(NQTIME,0) * ELSE * BEGIN * XFR$QB[0] = TRUE * NETWAIT(SHORT$WAIT,0) * IF XFR$COM2[0] * THEN * BEGIN * GOTO ENDQT * END * IF SD$FLAG EQ 0 * THEN * BEGIN * IF HEAD EQ FOOT * THEN * BEGIN * IF ID$FLAG EQ 0 * THEN * BEGIN * IF (NQTIME - SHORT$WAIT) LQ SHORT$WAIT * THEN * BEGIN * NETWAIT((NQTIME - SHORT$WAIT),0) * END * ELSE * BEGIN * NETWAIT(SHORT$WAIT,0) * IF XFR$COM2[0] * THEN * BEGIN * GOTO ENDQT * END * IF SD$FLAG EQ 0 * THEN * BEGIN * IF HEAD EQ FOOT * THEN * BEGIN * IF ID$FLAG EQ 0 * THEN * BEGIN * NETWAIT(NQTIME - SHORT$TIME2,0) * IF XFR$COM2[0] * THEN * BEGIN * GOTO ENDQT * END * END * END * END * END * END *ENDQT: XFR$QBC[0] = 0 * RETURN * * 4. ENTRY CONDITIONS. * NQTIME NETWAIT TIME * * 5. EXIT CONDITIONS. * NONE * * 6. COMDECKS AND SYMPL TEXT USED. * AIPDEF CONSTANT DEFINITIONS * NP$NWL NETWORK WORKLIST TABLE * NP$ACBX NETXFR COMMON BLOCK * * * 8. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION. * NONE # # EXTERNAL ROUTINES CALLED # XREF BEGIN PROC NETWAIT; # REGULAR NETWAIT # END # INPUT VARIABLES # ITEM NQTIME; # NETWAIT TIME # # LOCAL VARIABLES # DEF SHORT$WAIT # 2 #; # SHORT NETWAIT TIME # DEF SHORT$WAIT2 # 4 #; # FOUR SECONDS NETWAIT # #**********************************************************************# CONTROL EJECT; # EXECUTABLE CODE BEGINS HERE # IF NQTIME LQ SHORT$WAIT # IF NETWAIT IS LESS # THEN # THAN OR EQUAL TO 2 SECONDS # BEGIN NETWAIT(NQTIME,0); END ELSE # NETWAIT IS MORE THAN 2 # BEGIN # SECONDS # *IF,DEF,XFR XFR$QB[0] = TRUE; # CALLED THROUGH NETWTQ # *ENDIF NETWAIT(SHORT$WAIT,0); # FIRST 2 SECONDS NETWAIT # *IF,DEF,XFR IF XFR$COM2[0] THEN BEGIN GOTO ENDQT; # SKIP REST OF NETWAIT TIME # END *ENDIF IF SD$FLAG EQ 0 # NO SUPMSG FOR APP # THEN BEGIN IF HEAD EQ FOOT # NO SM IN SM BUFFER # THEN BEGIN IF ID$FLAG EQ 0 # NO DATA MSGS # THEN BEGIN IF (NQTIME - SHORT$WAIT) LQ SHORT$WAIT # LESS THAN OR # THEN # EQUAL TO 2 SECONDS LEFT # BEGIN NETWAIT((NQTIME - SHORT$WAIT),0); # WAIT FOR REST OF # # TIME # END ELSE BEGIN # CAN DO ANOTHER 2 SECONDS # NETWAIT(SHORT$WAIT,0); # SHORT NETWAIT # *IF,DEF,XFR IF XFR$COM2[0] # FILE TRANSFER COMPLETED # THEN BEGIN GOTO ENDQT; # SKIP REST OF FILE TRANSFER # END # TIME # *ENDIF IF SD$FLAG EQ 0 # IF NO SUPMSG AVAILABLE # THEN BEGIN IF HEAD EQ FOOT # NO SM IN SM BUFFER # THEN BEGIN IF ID$FLAG EQ 0 # NO DATA AVAILABLE # THEN BEGIN NETWAIT(NQTIME - SHORT$WAIT2,0); *IF,DEF,XFR IF XFR$COM2[0] # FILE TRANSFER COMPLETED # THEN BEGIN GOTO ENDQT; # SKIP REST OF FILE XFR TIME # END *ENDIF END END END END END END END END *IF,DEF,XFR ENDQT: XFR$QBC[0] = 0; # CLEAR ENTIRE XFR COMPLETION # # WORD # *ENDIF RETURN; # RETURN TO CALLER # END # ENDOF BEGIN # TERM