*DECK NS$HST USETEXT COM$NS USETEXT DEF$NS USETEXT HOC$NS USETEXT LIN$NS USETEXT NPT$NS USETEXT NST$NS PROC NS$HST(REASON); # STATUS DISPLAY COMMAND PROCESSOR # # TITLE NS$HST - STATUS DISPLAY COMMAND PROCESSOR. # BEGIN # NS$HST # # ** NS$HST - STATUS DISPLAY COMMAND PROCESSOR. * * J.C. LEE 1981 * * THIS ROUTINE IS THE STATUS DISPLAY COMMAND PROCESSOR. * * PROC NS$HST(REASON) * * ENTRY: * STATUS COMMAND IN COMMON BLOCK IN TEXT *HOC$NS*. * * EXIT: * REASON - HOP COMMAND ERROR REASON CODE. * POSSIBLE ERROR IS: * - NPU NOT FOUND/NOT CONFIGURED. * * METHOD: * IF COMMAND IS "STATUS,NPUS" * PROCESSES ALL NPUS IN THE NPU TABLE(NPT). * ELSE (STATUS,NPU=NPUNAME) * SEARCH NPU TABLE FOR SPECIFIED NPU, IF NOT FOUND, * FLAG ERRCODE AND EXIT. * IF FOUND, FORMAT STATUS LINES AND SEND THEM TO * KDB* . * # ITEM REASON U; # HOP COMMAND ERROR REASON CODE # $BEGIN XREF BEGIN PROC NS$DBG; # TRACE CALL # END $END XREF BEGIN FUNC EDATE C(10); # CONVERT TO DISPLAY CODED DATE # FUNC ETIME C(10); # CONVERT TO DISPLAY CODED TIME # PROC MOVEOK; # ALLOW TSB TO MOVE # FUNC NS$CHD C(10); # CONVERT TO DISPLAY CODED HEX # PROC NS$TKD; # TRANSFER DISPLAY DATA TO KDB # PROC TSBINFO; # LOCATE TSB # FUNC XCDD C(10); # CONVERT INTEGER TO DECIMAL DISPLAY # END DEF CHAR$COMMA # O"56" #; # COMMA # DEF ST$LC # 4 #; # STATUS DISPLAY LINE COUNT # DEF ST$LS # 8 #; # STATUS DISPLAY LINE SIZE # DEF ST$WC # ST$LC*ST$LS #; # STATUS DISPLAY WORD COUNT # DEF MAX$HDISCC # 60 #; # CHARACTERS ALLOWED FOR A HOP/DIS LINE # ITEM I I; # LOOP VARIABLE # ITEM J I; # LOOP VARIABLE # ITEM NBRS U; # NEIGHBOR NODE NUMBER # ITEM NPTCOUNT U; # NPT ENTRY COUNT # ITEM NPTINDEX U; # NPT ENTRY INDEX # ITEM NPUNAME C(7); # NPU NAME # ITEM NSTTSBN U; # NST TSB NUMBER # ITEM TEMP C(10); # TEMPORARY CHARACTER ITEM # ITEM TEMP1 U; # TEMPORARY # ITEM TSBFWA U; # TSB FWA # ITEM TSBSIZE U; # TSB SIZE # ITEM DONE B; # LOOP EXIT VARIABLE # ITEM FOUND B; # SPECIFIED NPU FOUND INDICATOR # ITEM ST$L1 C(60) = # STATUS DISPLAY LINE 1 # " NN= NBS= EC= "; ITEM ST$L2 C(14) = # STATUS DISPLAY LINE 2 # " LDS=0"; ARRAY STAT$DIS [1:ST$LC]S(ST$LS); BEGIN # STATUS DISPLAY FORMAT # ITEM ST$LNHDR U(00,00,60); # LINE HEADER WORD # ITEM ST$LNID U(00,00,24) = [ST$LC(LIN$IDENT)]; # LINE ID # ITEM ST$LNSIZE U(00,42,18) = [ST$LC(ST$LS)]; # LINE SIZE # ITEM ST$LINE C(01,00,60); # DISPLAY LINE # ITEM ST$TERM U(07,00,60) = [ST$LC(0)]; # LINE TERMINATOR # # STATUS DISPLAY LINE 1 FORMAT # ITEM ST$NPNAM C(01,00,07); # NPU NAME # ITEM ST$NID C(02,12,03); # NPU NODE NUMBER # ITEM ST$NNID C(03,12,23); # NEIGHBOR NODE NUMBER # ITEM ST$ECNT C(06,12,03); # PROTOCOL ERROR COUNT # # STATUS DISPLAY LINE 2 FORMAT # ITEM ST$LDCNT C(02,18,04); # LOAD COUNT # ITEM ST$ALFPFN C(02,48,07); # ALTERNATE LOAD FILE PFN # ITEM ST$LT C(04,42,23); # LOAD DATE/TIME # ITEM ST$LDATE C(05,00,08); # MOST RECENT LOAD DATE # ITEM ST$LTIME C(06,12,08); # MOST RECENT LOAD TIME # # STATUS DISPLAY LINE 3 FORMAT # ITEM ST$DUMPF C(01,54,06); # DUMP INDICATOR # ITEM ST$DFILE C(02,48,07); # NPU DUMP FILE NAME # ITEM ST$HALTC C(04,06,04); # NPU HALT CODE IN NPU DUMP # ITEM ST$DT C(04,42,23); # DUMP DATE/TIME # ITEM ST$DDATE C(05,00,08); # MOST RECENT DUMP DATE # ITEM ST$DTIME C(06,12,08); # MOST RECENT DUMP TIME # # STATUS DISPLAY LINE 4 FORMAT # ITEM ST$ACTEVT C(01,00,60); # ACTIVITY EVENT MESSAGE # END CONTROL EJECT; $BEGIN NS$DBG("HST"); # TRACE CALL # $END REASON = 0; NPUNAME = CMD$NPUNAM[PAR$NPU]; # NPU NAME SPECIFIED # IF NPUNAME NQ 0 OR CMD$WORD[PAR$NPUS] NQ 0 THEN BEGIN # ST,NPU=NPUNAME, OR ST,NPUS # NPTCOUNT = NPT$EC[0]; # NPU TABLE (NPT) ENTRY COUNT # NPTINDEX = 1; # PRESET INDEX TO FIRST ENTRY # IF NPUNAME NQ 0 THEN BEGIN # ST,NPU=NPUNAME # FOUND = FALSE; FOR I = 1 STEP 1 WHILE I LQ NPTCOUNT AND NOT FOUND DO BEGIN # SEARCH NPT FOR SPECIFIED NPU # IF NPT$NPNAME[I] EQ NPUNAME THEN BEGIN NPTINDEX = I; # FOUND, SET INDEX # FOUND = TRUE; END END IF NOT FOUND THEN BEGIN # SPECIFIED NPU NOT FOUND # REASON = HOPCMDERR"NPUNCNFG"; GOTO EXIT; END END DONE = FALSE; FOR I = NPTINDEX STEP 1 WHILE I LQ NPTCOUNT AND NOT DONE DO BEGIN # PROCESS ENTRY(IES) IN NPT # ST$LINE[1] = ST$L1; # INITIALIZE LINE 1 DISPLAY # ST$LINE[2] = ST$L2; # INITIALIZE LINE 2 DISPLAY # ST$LINE[3] = " "; # INITIALIZE LINE 3 DISPLAY # ST$LINE[4] = " "; # INITIALIZE LINE 4 DISPLAY # ST$NPNAM[1] = NPT$NPNAME[I]; TEMP = XCDD(NPT$NN[I]); ST$NID[1] = C<7,3>TEMP; TEMP = XCDD(NPT$PECNT[I]); ST$ECNT[1] = C<7,3>TEMP; IF NPT$ALFWD[I] NQ 0 THEN # ALTERNATE LOAD FILE IN USE # ST$ALFPFN[2] = NPT$ALFPFN[I]; # DISPLAY ALT NLF # NBRS = NPT$NBRS[I]; FOR J=0 STEP 1 WHILE J LS 6 AND NBRS NQ 0 DO # LIST NEIGHBOR NODE NUMBERS # BEGIN TEMP1 = B<52,8>NBRS; # NEIGHBOR NODE NUMBER # IF J NQ 0 THEN CST$NNID[1] = CHAR$COMMA; TEMP = XCDD(TEMP1); CST$NNID[1] = C<7,3>TEMP; NBRS = NBRS / LSHIFT8; END # END J LOOP # IF NPT$F$LTDF[I] THEN # NPU DUMP BEFORE A LOAD TAKES PLACE # ST$DUMPF[3] = "DUMP"; ELSE # NO NPU DUMP BEFORE A LOAD # ST$DUMPF[3] = "NODUMP"; NSTTSBN = NPT$NSTTSB[I]; # TSB NUMBER OF NST # IF NSTTSBN NQ 0 THEN # NST EXISTS # BEGIN TSBINFO(TSBSIZE,TSBFWA,NSTTSBN); # LOCATE NST # P = TSBFWA; TEMP = XCDD(NST$LC[0]); ST$LDCNT[2] = C<6,4>TEMP; # NPU LOAD COUNT # IF NST$LDATE[0] NQ 0 THEN BEGIN ST$LT[2] = "LD= LT= "; # INITIALIZE # TEMP = EDATE(NST$LDATE[0]); ST$LDATE[2] = C<1,8>TEMP; # SET LAST LOAD DATE # TEMP = ETIME(NST$LTIME[0]); ST$LTIME[2] = C<1,8>TEMP; # SET LAST LOAD TIME # END IF NST$NDFPFN[0] NQ 0 THEN # NPU DUMP FILE EXISTS # BEGIN ST$DFILE[3] = NST$NDFPFN[0]; # SET NPU DUMP FILE PFN # TEMP = NS$CHD(NST$NHC[0]); ST$HALTC[3] = C<0,4>TEMP; # SET NPU HALT CODE # ST$DT[3] = "DD= DT= "; # INITIALIZE # TEMP = EDATE(NST$DDATE[0]); ST$DDATE[3] = C<1,8>TEMP; # SET LAST NPU DUMP DATE # TEMP = ETIME(NST$DTIME[0]); ST$DTIME[3] = C<1,8>TEMP; # SET LAST NPU DUMP TIME # END ST$ACTEVT[4] = NST$EVMTXT[0]; # SET EVENT MESSAGE TEXT # FOR J=0 STEP 1 WHILE J LS MAX$HDISCC AND TEMP1 NQ 0 DO # SCAN FOR END OF EVENT MESSAGE TEXT # TEMP1 = CST$ACTEVT[4]; # CURRENT CHARACTER IN TEXT # IF J NQ MAX$HDISCC THEN # MAX TEXT LENGTH NOT YET REACHED # CST$ACTEVT[4] = " "; # BLANK-FILLED # MOVEOK(NSTTSBN); # ALLOW NST TO MOVE # END DCW$F$STS[0] = TRUE; # SET STATUS DISPLAY ASSIGNED # NS$TKD(STAT$DIS,ST$WC,ST$LC); # SEND DISPLAY TO KDB # IF FOUND THEN # SINGLE NPU ONLY # DONE = TRUE; END END ELSE # NPU MUST BE SPECIFIED # REASON = HOPCMDERR"NPUNSPEC"; EXIT: RETURN; END # NS$HST # TERM