*DECK NS$HSM
USETEXT COM$NS
USETEXT DEF$NS
USETEXT ERR$NS
USETEXT HOC$NS
USETEXT LIN$NS
USETEXT PCM$NS
USETEXT PFC$NS
USETEXT SMB$NS
PROC NS$HSM(ERRCODE); # HOST SUPERVISORY MESSAGE PROCESSOR #
# TITLE NS$HSM - HOST SM PROCESSOR. #
BEGIN # NS$HSM #
#
** NS$HSM - HOST SM PROCESSOR.
*
* J.C. LEE 1981
*
* THIS ROUTINE PROCESS HOST SMS.
*
* PROC NS$HSM(ERRCODE)
*
* ENTRY:
* NONE.
*
* EXIT:
* ERRCODE = ILLEGAL PFC/SFC IF ONE IS DETECTED.
*
* METHOD:
* VALIDATE ABH(ABT/ACT/ADR/TLC)
* IDENTIFY HOST SM.
* IF A VALID HOST SM, CALL APPROPRIATE ROUTINE TO PROCESS
* THE SM.
* ELSE, FLAG ERROR AND EXIT.
*
#
ITEM ERRCODE U; # ERROR CODE #
$BEGIN
XREF
BEGIN
PROC NS$DBG; # TRACE PROC CALL #
END
$END
XREF
BEGIN
PROC NDLOVLD; # OVERLAY LOADER #
FUNC NS$FEC U; # FORMAT ERROR CODE #
PROC NS$MSG; # MESSAGE DISPATCHER #
PROC NS$SHD; # SHUTDOWN NS #
PROC NS$TKD; # TRANSFER DATA TO K DISPLAY BUFFER #
PROC NETOFF; # DISCONNECT FROM NETWORK #
END
DEF ENDHSM # 15 #; # LARGEST HSM VALUE #
ITEM INDEX U; # LOOP COUNTER #
ITEM REASON U; # HOP COMMAND ERROR REASON CODE #
ARRAY HPFCSFC [0:ENDHSM] S(1); # TABLE OF PFC/SFC CODES FOR #
BEGIN # LEGAL NETWORK SUPERVISORY MSGS#
ITEM HSM$PFCSFC U(00,00,16) = [ # VALID HOST SM PFC/SFC #
HOPPAGE,
HOPCMD,
HOPBRK,
HOPSTRT,
HOPENDD,
HOPIG,
HOPDU,
HOPNOTR,
HOPREL,
HOPRS,
HOPTRCE,
HOPDB,
HOPDE,
ERRLGL,
SHUINS,
0
];
ITEM HSM$PCMDI U(00,42,18) = [ # PROGRAM COMMAND ORDINAL #
0,
0,
0,
0,
0,
0,
PCMDI"DU",
PCMDI"NOTR",
PCMDI"REL",
PCMDI"RS",
PCMDI"TRCE",
PCMDI"DB",
PCMDI"DE",
0,
0,
0,
];
END
DEF L$RSHDMSG # 4 #; # MESSAGE SIZE #
DEF DM$RSHDMSG # DM$LOCAL #; # MESSAGE ROUTING OPTIONS #
ARRAY MSG$RSHD [0:1] S(L$RSHDMSG);
BEGIN # SHUTDOWN REQUESTED MESSAGE #
ITEM RSHD$TEXT C(00,00,35) = [
"GRADUAL SHUTDOWN REQUESTED.",
"IMMEDIATE SHUTDOWN REQUESTED.",
];
ITEM RSHD$END U(03,30,30) = [2(0)];
END
DEF L$READY # 2 #; # SIZE OF READY .. LINE #
ARRAY READY[0:0]S(L$READY);
BEGIN # READY .. LINE #
ITEM RDY$LNHDR U(00,00,60); # LINE HEADER WORD #
ITEM RDY$LNID U(00,00,24) = [LIN$IDENT]; # LINE ID #
ITEM RDY$F$RSP B(00,41,01) = [TRUE]; # END OF COMMAND RESPONSE#
ITEM RDY$LNSIZE U(00,42,18) = [L$READY]; # LINE SIZE #
ITEM RDY$TEXT C(01,00,07) = ["READY.."]; # LINE TEXT #
ITEM RDY$TERM U(01,42,18) = [0]; # LINE TERMINATOR #
END
ARRAY BRK$OVLY [0:0] S(1);
BEGIN # HOP/BRK PROCESSOR OVERLAY NAME/LEVEL #
ITEM HBRK$NAM C(00,00,07) = ["BRKOVLY"];
ITEM HBRK$LV1 U(00,42,09) = [2];
ITEM HBRK$LV2 U(00,51,09) = [1];
END
ARRAY END$OVLY [0:0] S(1);
BEGIN # HOP/END PROCESSOR OVERLAY NAME/LEVEL #
ITEM HEND$NAM C(00,00,07) = ["ENDOVLY"];
ITEM HEND$LV1 U(00,42,09) = [2];
ITEM HEND$LV2 U(00,51,09) = [2];
END
ARRAY HCP$OVLY [0:0] S(1);
BEGIN # HOP/CMD PREPROCESSOR OVERLAY NAME/LEVEL #
ITEM HHCP$NAM C(00,00,07) = ["HCPOVLY"];
ITEM HHCP$LV1 U(00,42,09) = [2];
ITEM HHCP$LV2 U(00,51,09) = [3];
END
ARRAY HFI$OVLY [0:0] S(1);
BEGIN # FILE COMMAND PROCESSOR OVERLAY #
ITEM HHFI$NAM C(00,00,07) = ["HFIOVLY"];
ITEM HHFI$LV1 U(00,42,09) = [2];
ITEM HHFI$LV2 U(00,51,09) = [4];
END
ARRAY HHI$OVLY [0:0] S(1);
BEGIN # HISTORY COMMAND PROCESSOR OVERLAY #
ITEM HHHI$NAM C(00,00,07) = ["HHIOVLY"];
ITEM HHHI$LV1 U(00,42,09) = [2];
ITEM HHHI$LV2 U(00,51,09) = [5];
END
ARRAY HNO$OVLY [0:0] S(1);
BEGIN # NOFILE COMMAND PROCESSOR OVERLAY #
ITEM HHNO$NAM C(00,00,07) = ["HNOOVLY"];
ITEM HHNO$LV1 U(00,42,09) = [2];
ITEM HHNO$LV2 U(00,51,09) = [6];
END
ARRAY HST$OVLY [0:0] S(1);
BEGIN # STATUS COMMAND PROCESSOR OVERLAY #
ITEM HHST$NAM C(00,00,07) = ["HSTOVLY"];
ITEM HHST$LV1 U(00,42,09) = [2];
ITEM HHST$LV2 U(00,51,09) = [7];
END
ARRAY KDD$OVLY [0:0] S(1);
BEGIN # K DISPLAY DIAGNOSTIC OVERLAY NAME/LEVEL #
ITEM HKDD$NAM C(00,00,07) = ["KDDOVLY"];
ITEM HKDD$LV1 U(00,42,09) = [2];
ITEM HKDD$LV2 U(00,51,09) = [8];
END
ARRAY PAG$OVLY [0:0] S(1);
BEGIN # HOP/PAGE PROCESSOR OVERLAY NAME/LEVEL #
ITEM HPAG$NAM C(00,00,07) = ["PAGOVLY"];
ITEM HPAG$LV1 U(00,42,09) = [2];
ITEM HPAG$LV2 U(00,51,09) = [9];
END
ARRAY PCM$OVLY [0:0] S(1);
BEGIN # PROGRAM COMMAND PROCESSOR OVERLAY #
ITEM HPCM$NAM C(00,00,07) = ["PCMOVLY"];
ITEM HPCM$LV1 U(00,42,09) = [2];
ITEM HPCM$LV2 U(00,51,09) = [10];
END
ARRAY STR$OVLY [0:0] S(1);
BEGIN # HOP/START PROCESSOR OVERLAY NAME/LEVEL #
ITEM HSTR$NAM C(00,00,07) = ["STROVLY"];
ITEM HSTR$LV1 U(00,42,09) = [2];
ITEM HSTR$LV2 U(00,51,09) = [11];
END
SWITCH HSMSWITCH # HOST SM PFC/SFC SWITCH #
HSM$PAGE,
HSM$CMD,
HSM$BRK,
HSM$STRT,
HSM$ENDD,
HSM$IG,
HSM$PCMD,
HSM$PCMD,
HSM$PCMD,
HSM$PCMD,
HSM$PCMD,
HSM$PCMD,
HSM$PCMD,
HSM$ERRLGL,
HSM$SHUINS,
HSM$ERR,
;
SWITCH HOPCMDCASE:HCT # SWITCH FOR VALID HOP COMMANDS #
LB$STATUS:CMD$STATUS,
LB$HISTORY:CMD$HIST,
LB$FILE:CMD$FILE,
LB$NOFILE:CMD$NOFILE;
CONTROL EJECT;
# VALIDATE ABH #
$BEGIN
NS$DBG("HSM"); # TRACE CALL #
$END
REASON = 0;
ERRCODE = 0;
IF ABHABT[0] EQ APPCMD # ABT=3 #
AND ABHADR[0] EQ 0 # CONNECTION 0 SM #
AND ABHACT[0] EQ CT60TRANS # ACT = TRANSPARENT GO #
AND ABHTLC[0] LQ MAX$SMSIZE # TLC IS WITHIN LIMIT #
THEN # VALID ABH #
BEGIN # IDENTIFY SUPERVISORY MESSAGE #
HSM$PFCSFC[ENDHSM] = PFCSFC[0]; # GURANTEE PFC/SFC MATCH #
FOR INDEX=0 WHILE HSM$PFCSFC[INDEX] NQ PFCSFC[0]
DO
BEGIN
INDEX = INDEX + 1;
END
GOTO HSMSWITCH[INDEX]; # SWITCH ON PFC/SFC #
HSM$STRT:
NDLOVLD(STR$OVLY,ERRCODE); # PROCESS HOP/START #
IF ERRCODE EQ 0
THEN # NO NAM ERROR DETECTED #
BEGIN # SEND OUT DEFAULT HISTORY DISPLAY #
CMD$WORD[PAR$CMD] = 0; # CLEAR COMMAND VERB #
CMD$WORD[PAR$ALL] = 0; # FAKE HISTORY COMMAND #
GOTO LB$HISTORY;
END
ELSE
GOTO HSMEXIT;
HSM$CMD: # PROCESS HOP/CMD/SM #
P<SMB> = LOC(HOPMSG[0]); # FWA OF HOP COMMAND TEXT #
NDLOVLD(HCP$OVLY,SMB,HOPDTL[0],ERRCODE,REASON);
# PREPROCESS HOP COMMAND TEXT #
IF ERRCODE EQ 0
THEN # NO NAM ERROR ENCOUNTERED #
BEGIN
IF REASON EQ 0
THEN # NO HOP COMMAND ERRROR DETECTED SO FAR #
GOTO HOPCMDCASE[CMD$ORD[0]]; # CASE ON HOP COMMAND VERB #
ELSE # HOP COMMAND ERROR #
GOTO CMDEXIT;
END
ELSE # NAM ERROR OCCURRED #
GOTO HSMEXIT;
LB$STATUS: # NPU STATUS DISPLAY COMMAND #
NDLOVLD(HST$OVLY,REASON);
GOTO CMDEXIT;
LB$HISTORY: # HISTORY DISPLAY COMMAND #
NDLOVLD(HHI$OVLY);
GOTO CMDEXIT;
LB$FILE: # ALTERNATE LOAD FILE COMMAND #
NDLOVLD(HFI$OVLY,REASON);
GOTO CMDEXIT;
LB$NOFILE: # CANCEL ALTERNATE LOAD FILE COMMAND #
NDLOVLD(HNO$OVLY,REASON);
GOTO CMDEXIT;
CMDEXIT:
IF REASON NQ 0
THEN # HOP COMMAND ERROR, ISSUE GIAGNOSTIC #
NDLOVLD(KDD$OVLY,REASON);
SENDREADY: # SEND READY.. TO K DISPLAY #
NS$TKD(READY,L$READY,1);
GOTO HSMEXIT;
HSM$PAGE:
NDLOVLD(PAG$OVLY,ERRCODE);
GOTO HSMEXIT;
HSM$BRK:
NDLOVLD(BRK$OVLY,ERRCODE);
IF ERRCODE EQ 0
THEN # NO NAM ERROR DETECTED #
GOTO SENDREADY; # SEND READY .. TO K DISPLAY #
ELSE # NAM ERROR DETECTED #
GOTO HSMEXIT;
HSM$IG:
DCW$F$IG[0] = TRUE; # DISABLE HOP ALERT MECHANISM #
GOTO HSMEXIT;
HSM$ENDD:
NDLOVLD(END$OVLY,ERRCODE);
GOTO HSMEXIT;
HSM$PCMD:
NDLOVLD(PCM$OVLY,HSM$PCMDI[INDEX]); # PROCESS PROGRAM COMMAND #
GOTO HSMEXIT;
HSM$ERRLGL:
ERRCODE = NS$FEC(EC"ERR$LGL",ERRRLG[0]); # SET LOGICAL ERROR #
GOTO HSMEXIT;
HSM$SHUINS:
IF SHUTF[0]
THEN # FORCE SHUTDOWN REQUESTED #
BEGIN
INDEX = 1;
FORCESHUT = TRUE;
END
ELSE # GRADUAL SHUTDOWN REQUESTED #
BEGIN
INDEX = 0;
GRADSHUT = TRUE;
END
NS$MSG(MSG$RSHD[INDEX],L$RSHDMSG,DM$RSHDMSG);
GOTO HSMEXIT;
HSM$ERR: # PROCES ERROR #
ERRCODE = NS$FEC(EC"ERR$SM",SMEC"HSM$PFCSFC");
GOTO HSMEXIT;
END
ELSE # NAM ERROR - ILLEGAL PFC/SFC #
ERRCODE = NS$FEC(EC"ERR$SM",SMEC"HSM$ABH");
HSMEXIT:
RETURN;
END # NS$HSM #
TERM