*DECK CSESOD
USETEXT TEXTCS
USETEXT TEXTSS
USETEXT TXTAPSS
USETEXT TXTSMCS
PROC CSESOD;
# TITLE - SEND ON-LINE DIAGNOSTICS. #
BEGIN
#
** CSESOD - SEND ON-LINE DIAGNOSTICS.
*
* D.K. ENDO 82/03/29
*
* THIS PROCEDURE FORMATS THE ON-LINE DIAGNOSTIC DATA AND SENDS IT
* TO THE OPERATOR VIA THE OPERATOR RESPONSE QUEUE.
*
* PROC CSESOD
*
* ENTRY 1. OLD/DT SM FROM THE EVENT QUEUE.
*
* EXIT 1. DATA TEXT TO THE OPERATOR RESPONSE QUEUE WITH THE
* AUDIENCE GROUP SET TO THREE.
*
#
#
**** PROC CSESOD - XREF LIST BEGINS.
#
XREF
BEGIN
PROC CSESLE; # SEND LOG FILE ENTRY #
PROC SSBSBF; # STORE BIT FIELD #
FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY CODE #
PROC SSTAQE; # ADD QUEUE ENTRY #
END
#
****
#
DEF NONTXT$ # 3 #; # NUMBER CHARS THAT ARE NOT TEXT #
DEF SNM$TXTL # 30 #; # SOURCE NPU-NAME MESSAGE TEXT LENGTH #
ITEM A$CHAR; # ASCII CHAR TO BE CONVERTED #
ITEM BPOS; # BIT POSITION OF CURRENT ASCII CHARACTER #
ITEM CHARCNT; # CURRENT CHARACTER COUNT IN MESSAGE #
ITEM CHARPOS; # BIT POSITION OF CRNT DISPLAY CODE CHAR #
ITEM CNST1; # INTEGER CONSTANT ---> 1 #
ITEM CNST2; # INTEGER CONSTANT ---> 2 #
ITEM CNST3; # INTEGER CONSTANT ---> 3 #
ITEM I; # LOOP INDUCTION VARIABLE #
ITEM MCC; # MESSAGE CHARACTER LENGTH #
ITEM MWC; # WORD COUNT INTO DATA MESSAGE #
ITEM WC; # WORD COUNT OF OPERATOR TEXT #
#
THIS ARRAY IS USED TO BUILD THE DATA TEXT TO BE SENT TO THE DIAG
OPERATOR WHEN A OLD/DT/U IS RECEIVED.
#
DEF MX$OLD # 7 #;
ARRAY OLD$TXT [01:MX$OLD] S(1);
BEGIN
ITEM OLD$TIM C(00,00,10);
ITEM OLD$WORD U(00,00,60);
END
#
THIS ARRAY DEFINES THE SOURCE NPU NAME TEXT SENT TO PREFIX THE ON
LINE DIAGNOSTIC TEXT.
#
ARRAY SNM$TXT [00:02] S(1);
BEGIN
ITEM SNM$TIM C(00,00,10);
ITEM SNM$MSG C(01,00,18) =["FROM UNKNOWN/OLD: "];
ITEM SNM$ZBYT U(02,48,12) = [0];
END
CONTROL EJECT;
# #
# CSESOD CODE BEGINS HERE #
# #
#
* BUILD AND SEND MESSAGE INDICATING WHICH NPU THIS DIAGNOSTIC CAME
* FROM. SEARCH THE NPUCB-S FOR THIS NPU. IF FOUND APPEND THE
* NPU NAME TO THE TEXT, ELSE APPEND *UNKNOWN* TO THE TEXT. SEND
* TEXT TO THE OPERATOR RESPONSE QUEUE.
#
SNM$TIM[0] = CTM$CLOCK[0];
FOR I=0 STEP 1 WHILE ABHSN[0] NQ NPU$NID[I] AND
I LS CSNPCNT
DO
BEGIN
END
CNST1 = 1;
CNST2 = 30;
CNST3 = 42;
IF I LS CSNPCNT
THEN
BEGIN
SSBSBF(SNM$TXT,CNST1,CNST2,CNST3,B<0,42>NPU$NAME[I]);
END
ELSE
BEGIN
SSBSBF(SNM$TXT,CNST1,CNST2,CNST3," UNKNOWN");
END
WCB$WORD[1] = 2 + SNM$TXTL/10;
WCB$SMID[1] = SMID"TTEXT";
ABHWORD[1] = SNM$TXTL;
ABHADR[1] = OLDDO[0];
SSTAQE(P<CNQ>,WCBUF[1],ABH[1],SNM$TXT);
CSESLE(ABHSN[0],WCBUF[1],SNM$TXT);
#
* APPEND THE CURRENT TIME TO THE TEXT. CONVERT MESSAGE TO DISPLAY
* CODE AND APPEND TO TEXT TO OPERATOR TEXT. SEND DIAGNOSTIC TEXT
* TO OPERATOR RESPONSE QUEUE WITH AN AUDIENCE GROUP OF THREE.
#
OLD$TIM[1] = CTM$CLOCK[0];
FOR I=2 STEP 1 UNTIL MX$OLD
DO
BEGIN
OLD$WORD[I] = 0;
END
A$CHAR = 0;
BPOS = 24;
CHARCNT = 1;
MWC = 0;
MCC = ABHTLC[0] - NONTXT$;
FOR WC=2 STEP 1 WHILE CHARCNT LQ MCC AND
WC LS MX$OLD
DO
BEGIN
FOR CHARPOS=0 STEP 6 WHILE CHARCNT LQ MCC AND
CHARPOS LS 60
DO
BEGIN
IF BPOS LQ 52
THEN
BEGIN
A$CHAR = B<BPOS,8>MSG$WORD[MWC];
B<CHARPOS,6>OLD$WORD[WC] = SSDCAD(A$CHAR);
BPOS = BPOS + 8;
END
ELSE IF BPOS EQ 56
THEN
BEGIN
B<52,4>A$CHAR = B<BPOS,4>MSG$WORD[MWC];
MWC = MWC + 1;
B<56,4>A$CHAR = B<0,4>MSG$WORD[MWC];
B<CHARPOS,6>OLD$WORD[WC] = SSDCAD(A$CHAR);
BPOS = 4;
END
ELSE
BEGIN
MWC = MWC + 1;
A$CHAR = B<0,8>MSG$WORD[MWC];
B<CHARPOS,6>OLD$WORD[WC] = SSDCAD(A$CHAR);
BPOS = 8;
END
CHARCNT = CHARCNT + 1;
END
END
IF CHARPOS LQ 48
THEN
BEGIN
WC = WC - 1;
END
WCB$WC[1] = 2 + WC;
ABHTLC[1] = WC * 10;
SSTAQE(P<CNQ>,WCBUF[1],ABH[1],OLD$TXT);
CSESLE(ABHSN[0],WCBUF[1],OLD$TXT);
RETURN; # **** RETURN **** #
END # CSESOD #
TERM