*DECK NS$DAR USETEXT DEF$NS USETEXT ERR$NS USETEXT NAT$NS USETEXT NPT$NS USETEXT PFC$NS USETEXT PIC$NS USETEXT SMB$NS USETEXT SMD$NS PROC NS$DAR(ERRCODE); # PROCESS ABNORMAL RESPONSE FROM NPU # # TITLE NS$DAR - PROCESS ABNORMAL RESPONSE FROM NPU. # BEGIN # NS$DAR # # ** NS$DAR - PROCESS ABNORMAL RESPONSE FROM NPU. * * J.C. LEE 1981 * * THIS ROUTINE PROCESS ABNORMAL RESPONSE FROM NPU. * * PROC NS$DAR(ERRCODE) * * ENTRY: * NONE. * * EXIT: * ERRCODE - SET IF ERROR IS FOUND. * * METHOD: * IF RETRY-COUNT = 0, MESSAGE TO DAYFILE AND ABORT. * IF RETRY-COUNT NOT REACH LIMIT, DETERMINE TYPE OF * ABNORMAL RESPONSE. * IF ABNORMAL DUMP RESPONSE, SET DUMP REQUEST TEXT * LENGTH, AND RESTART REQUEST. * IF ABNORMAL LOAD RESPONSE, SET ERRCODE, AND ABORT * NPU LOAD. * IF ABNORMAL START RESPONSE, SET START REQUEST TEXT * LENGTH, AND RESTART REQUEST. * IF RETRY-COUNT REACH LIMIT. SET ERRCODE AND ABORT * CURRENT ACTIVITY. * # ITEM ERRCODE U; # ERROR CODE # $BEGIN XREF BEGIN PROC NS$DBG; # TRACE PROCEDURE CALL # END $END XREF BEGIN PROC NS$FBH; # FORMAT APPLICATION BLOCK HEADER # FUNC NS$FEC U; # FORMAT ERROR CODE # PROC NS$MSG; # DISPATCH MESSAGE # FUNC NS$CHD C(4); # CONVERT HEX TO DISPLAY CODE # PROC NETPUT; # SEND MESSAGE TO NETWORK # END DEF MAX$RETRYS # 3 #; # MAXIMUM RETRY COUNT ALLOWED # ITEM COMCODE U; # COMMAND CODE # ITEM CCMNEMONIC C(3) = "DLS"; # VALID NPU/DT/A COMMAND CODE # ITEM TEMP U; # TEMPORARY # DEF DM$MAR # DM$LOCAL+DM$NAMLOG+DM$EVENT #; # ROUTE OPTIONS # DEF L$MAR # 4 #; ARRAY MSG$MAR [0:0] S(L$MAR); BEGIN # EVENT MESSAGE FOR ABNORMAL RESPONSE # ITEM MAR$TEXT C(0,0,38) = # EVENT MESSAGE TEXT # ["NPUNAME, RECEIVED NPU/DT/A(C) RC = XX."]; ITEM MAR$NPNAM C(00,00,07); # NPU NAME # ITEM MAR$PFCSFC C(01,48,06); # PFC/SFC OF SM # ITEM MAR$CC U(02,42,06); # COMMAND CODE # ITEM MAR$RC U(03,30,12); # REASON CODE IN HEXADECIMALS # ITEM MAR$END U(03,48,12) = [0]; # LINE TERMINATOR # END SWITCH ANPUDTCASE:DIRCODE # NPU/DT/A CASES # AR$DUMP:DUMP, AR$LOAD:LOAD, AR$START:START; CONTROL EJECT; $BEGIN NS$DBG("DAR"); # TRACE CALL # $END ERRCODE = 0; COMCODE = NPUCC[0]; # COMMAND CODE # IF NAT$RETRYS[0] EQ 0 THEN # NO RETRY HAS YET BEEN ATTEMPTED # BEGIN # DAYFILE ABNORMAL RESPONSE # MAR$NPNAM[0] = NPNAM; # SET NPU NAME # TEMP = CCCMNEMONIC; # COMMAND CODE MNEMONIC # MAR$CC[0] = TEMP; TEMP = NS$CHD(NPURC[0]); # GET REASON CODE IN DISPLAY HEX # MAR$RC[0] = TEMP; NS$MSG(MSG$MAR,L$MAR,DM$MAR); # DISPATCH MESSAGE # END NAT$RETRYS[0] = NAT$RETRYS[0] + 1; # INCREMENT RETRY COUNT # IF NAT$RETRYS[0] LQ MAX$RETRYS THEN # MAXIMUM RETRY COUNT NOT REACHED # BEGIN # PROCESS ABNORMAL RESPONSE # GOTO ANPUDTCASE[COMCODE]; # CASE ON NPU/DT/A # AR$DUMP: # ABNORMAL DUMP RESPONSE # TEMP = LNPUDTDR; # DUMP REQUEST TEXT LENGTH # RESENDR: # RESEND REQUEST TO NPU # NS$FBH(TEMP,FALSE); # FORMAT APPLICATION BLOCK HEADER # EB[0] = FALSE; # RESET ERROR RESPONSE BIT # NPURC[0] = 0; # RESET REASON CODE TO ZERO # NETPUT(ABH$WORD,SMB$BUFFER); # RESEND REQUEST # GOTO DAREXIT; AR$LOAD: # ABNORMAL LOAD RESPONSE # ERRCODE = NS$FEC(EC"ERR$ABRESP",0); # ABORT NPU LOAD # GOTO DAREXIT; AR$START: # ABNORMAL START RESPONSE # TEMP = LNPUDTSR; # START REQUEST TEXT LENGTH # GOTO RESENDR; # RESEND START REQUEST TO NPU # END ELSE # RETRY COUNT EXCEEDED, ABORT CURRENT ACTIVITY # BEGIN NAT$RETRYS[0] = 0; # RESET RETRY COUNT # ERRCODE = NS$FEC(EC"ERR$RETRYS",0); END DAREXIT: RETURN; END # NS$DAR # TERM