*DECK NETOFF USETEXT AIPDEF USETEXT NP$MODE USETEXT NP$NWL USETEXT NP$STAT *IF,DEF,DEBUG USETEXT NP$DB *IF DEF,XFR,1 USETEXT NX$ACBF *ENDIF PROC NETOFF; *IF DEF,IMS # *1DC NETOFF * * 1. PROC NAME AUTHOR DATE * NETOFF S.KRULEVITCH 77/06/28 * * 2. FUNCTIONAL DESCRIPTION * THIS ROUTINE INFORMS NIP THAT THE APPLICATION IS NETTING OFF. * IT RESTORES AIP TO THE STATE IT WAS IN PRIOR TO NETON. * * 3. METHOD USED * FORMATS A NETOFF WORKLIST ENTRY AND SENDS IT TO NIP BY NP$XFER. * WHEN DEBUG OPTION IS DEFINED A TWO WORD ENTRY IS WRITTEN TO * THE DEBUG LOG FILE. * WORD 0 * 2 * 0 4 * I-------------------------I----------------I * I I I * I SECONDS SINCE DEADSTART I MILLISECONDS I * I I I * I-------------------------I----------------I * * WORD 1 * 2 4 5 * 4 2 3 * I-------I---------I--------I---------I * I I I I I * I I OFF$CAL I I OFF$OPC I * I I I I I * I-------I---------I--------I---------I * * OFF$CAL - CALLING ADDRESS * OFF$OPC - NETOFF OP$CODE (=7) * * NAMA614 * 4. ENTRY CONDITIONS NAMA614 * NEXT - WORKLIST NEXT AVAILABLE WORD PTR NAMA614 * NAMA614 * 5. EXIT CONDITIONS NAMA614 * DEFER$PRO = FALSE * DEFER$GSM = FALSE * LTAA = 0 * PARALLEL = FALSE * PN - PROCESS NUMBER IS SET TO 0. NAMA614 * ACCEPTED - AIP ON/OFF SWITCH SET OFF NAMA614 * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * AIPDEF NP$CRT * NP$DB NP$MODE NP$NWL NP$STAT * * 7. ROUTINES CALLED * NP$CLK - DELIVERS TIME IN DISPLAY CODE (STAT DEFINED) * NP$DATE - DELIVERS DATE IN DISPLAY CODE (STAT DEFINED) * NP$PIOE - PROCESS I/O ERROR AFTER WRITE OPERATION ON FILE * NP$RTIM - DELIVERS TIME FROM DEADSTART IN SECONDS AND * MILLISECONDS (STAT/DEBUG DEFINED) * NP$SPRT - OUTPUTS STATISTICS TO,THEN CLOSES,ZZZZZSN.(STAT) * NP$WRTW - WRITES TEXT TO SPECIFIED FILE.(STAT/DEBUG DEFINED) * NP$WRTR - CLOSES FILE BY WRITING EOR.(DEBUG DEFINED) * NP$XFER - TRANSFERS WORKLIST TO NIP * * 8. DAYFILE MESSAGES * NONE * # *ENDIF BEGIN *CALL NP$CRT # # # EXTERNAL ROUTINES: # # # XREF BEGIN *IF DEF,DEBUG PROC NP$RTIM; #RETURNS TIME SINCE DEADSTART # *IF DEF,XFR,1 PROC NP$ERR ; # ERROR MESSAGE TO DAYFILE # PROC NP$WRTR; #WRITES EOR TO ZZZZZDN # PROC NP$WRTW; #WRITES WORDS TO ZZZZZDN # PROC NP$PIOE; # PROCESS I/O ERROR ON FILE # *ENDIF *IF DEF,STAT PROC NP$CLK; #DELIVERS TIME IN DISPLAY CODE # PROC NP$DATE; #DELIVERS DATE IN DISPLAY CODE # PROC NP$SPRT; #PUTS STATISTICS ON ZZZZZSN # *IF -DEF,DEBUG PROC NP$WRTW; #WRITES WORDS ON FILE # PROC NP$PIOE; # PROCESS I/O ERROR ON FILE # *ENDIF PROC NP$XFER; #TRANSFERS WORKLIST TO NIP # END #XREFS# # # # LOCAL DECLARATIONS # # # ITEM I I; #INDEX VARIABLE # ARRAY OFFWL[0:3] P(1); ITEM OFFHDR I (0), OFFHDR$P U (0,9,12), #PROCESS NUMBER # OFFHDR$N U (0,22,8), #NO. OF ENTRIES IN WORKLIST # OFFHDR$W U (0,30,12), #NO. OF WORDS IN WORKLIST # OFFHDR$AWL U (0,42,18), #ADDR WHERE WORKLIST RETURNED # OFFNWL I (0), *IF DEF,DEBUG OFFNWL$ID U (0,0,6), #UNPROCESSED WORKLIST ID = 35 # *ENDIF OFFNWL$BS U (0,6,18), #BLOCK SIZE # OFFNWL$OP U (0,54,5); #OP CODE # *IF DEF,DEBUG # DEBUG OPTION ARRAY DEFINITIONS # ARRAY OFFLINE P(2); # LOGS NETOFF ENTRY # BEGIN ITEM OFF$TIM U(0,0,60); # TIME OF CALL TO NETOFF # ITEM OFF$CAL U(1,24,AL); # NETOFF CALLING ADDRESS # ITEM OFF$OPC I(1,54,6); # NETOFF OPCODE (=7) # END # DEBUG OPTION ITEM DEFINITIONS # ITEM TIMEWD U; # REAL TIME SINCE DEADSTART # *ENDIF *IF DEF,STAT ITEM CHARWD C(10); *ENDIF *IF DEF,STAT ARRAY STMSG P(5); ITEM ST$CC C(0,0,10)=["0 "], #DOUBLE SPACE # ST$MSG12 C(1,0,35)=["NAM STATISTICS GATHERING TERMINATED"]; ARRAY STMSGA P(6); ITEM ST$CCA C(0,0,10)=[" "], #SINGLE SPACE # ST$MSG3 C(1,0,13)=["NETOFF DATE "], ST$DATE C(2,18,10), ST$MSG4 C(3,18,7)=[" TIME"], ST$TIME C(4,0,10), ST$EOLA I(5,0,60)=[0]; *ENDIF #**********************************************************************# # # # NETOFF EXECUTION BEGINS HERE: # IF NOT ACCEPTED THEN RETURN; #NO NETON # *IF DEF,DEBUG # FORMAT LOG ENTRY FOR NETOFF CALL # P = LOC(NETOFF); # GET CALL ADDRESS # NP$RTIM(TIMEWD); # GET REAL TIME SINCE DEADSTART # OFF$TIM[0] = TIMEWD; OFF$CAL[0] = CALLADDR[0]; OFF$OPC[0] = OP$OFF; NP$WRTW(DB$FET,OFFLINE,2); # WRITE NETOFF TO DEBUG LOG # NP$WRTR(DB$FET,1); # WRITE EOR TO DEBUG LOG # # CHECK FOR I/O ERROR IN DEBUG LOG FILE # IF FET$AT[0] NQ 0 THEN # I/O ERROR HAS OCCURRED ON FILE# BEGIN NP$PIOE(DB$FET); # PROCESS I/O ERROR # END # NSUPWRD BASED ARRAY POINTER TO THE USER COMMUNICATION WORD WAS SET BY NETON. THE ARRAY IS LOCATED IN NP$NWL COMDECK. UPDATE MSGCNT IN NSUP COMMUNICATION WORD. # MSGCNT[0] = MSGCNT[0] +1; # # *ENDIF *IF DEF,STAT NP$DATE(CHARWD); #PUT CURRENT DATE IN OUTPUT LINE # ST$DATE = CHARWD; NP$CLK(CHARWD); #GET TIME IN DISPLAY CODE # ST$TIME = CHARWD; #PUT DISPLAY CODE TIME IN CHARACTER ARRAY # NP$WRTW(SN$FET,STMSG,5); NP$WRTW(SN$FET,STMSGA,6); # CHECK FOR I/O ERROR IN STATISTICS FILE # IF SN$AT[0] NQ 0 THEN # I/O ERROR HAS OCCURRED ON FILE# BEGIN NP$PIOE(SN$FET); # PROCESS I/O ERROR # END NP$SPRT; #DUMP STATISTICS TO ZZZZZSN # *ENDIF # # *IF DEF,XFR *IF DEF,DEBUG,3 IF NUMFILEXFR NQ 0 THEN NP$ERR("45"); # STILL FILE BEING TRANSFERRED # # OUTSTANDING, ABORT C.P. # *ENDIF # BUILD NETOFF REQUEST IN OFFNWL # # # OFFHDR[NHDR] = LOC(OFFHDR[NHDR]) + 1; OFFHDR$P[NHDR] = PN; OFFHDR$N[NHDR] = 1; OFFHDR$W[NHDR] = OPABHSIZ + NHDR; I = NHDR + 1; OFFNWL[I] = 0; *IF DEF,DEBUG OFFNWL$ID[I] = AWLID; *ENDIF OFFNWL$BS[I] = OPABHSIZ; OFFNWL$OP[I] = OP$OFF; # # # SEND NWL TO NIP VIA SSCALL: # # # PARALLEL = FALSE; NP$XFER(LOC(OFFWL[NCTL])); #SENDS WORKLIST TO NIP # # # # REINITIALIZE AIP STATES # # # DEFER$PRO = FALSE ; DEFER$GSM = FALSE ; LTAA = 0 ; ACCEPTED = FALSE; RETURN; END #NETOFF# TERM