*DECK CSSATR
USETEXT TEXTCS;
USETEXT TEXTSS;
USETEXT TXCMDCS;
USETEXT TXTSMCS;
USETEXT TXTAPSS;
USETEXT TXTSUSS;
PROC CSSATR;
# TITLE CSSATR - ACTION TEST REQUEST COMMAND #
BEGIN # CSSATR #
#
** CSSATR - ACTION TEST REQUEST COMMAND.
*
* C. BRION 82/06/09.
*
* THIS PROCEDURE PROCESSES THE DIAGNOSTIC TEST REQUEST COMMAND.
*
* PROC CSSATR
*
* ENTRY:
*
* HDRCMD = COMMAND HEADER WORD.
*
* EXIT:
*
* AN OLDIN SM MAY BE SENT TO THE NPU.
* A COMMAND TEXT EVENT MAY BE SENT TO THE EVENT PROCESSOR FOR
* ENTRY INTO THE NETWORK LOG FILE.
* THE OCB AND NPUCB WILL BE UPDATED.
#
#
**** PROC CSSATR XREF LIST
#
XREF
BEGIN
PROC SSBSBW; # SS-SET BIT IN WORD #
PROC SSBTBW; # SS-TEST BIT IN WORD #
PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
PROC MOVE; # MACREL MOVE MEMORY #
END
#
****
#
ITEM I U; # LOOP INDUCTION VAR #
ITEM OORD U; # OCB ORDINAL #
ITEM NORD U; # NPUCB ORDINAL #
ITEM FOUND B; # NOR FOUND FLAG #
ITEM RUNNING B; # ONLINE DIAG RUNNING FLAG #
#
* FLG$WORD - BASED ARRAY THAT POINTS TO THE ONLINE DIAGNOSTICS
* OPERATOR BIT MAP.
#
BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
BEGIN
ITEM FW$WORD I(00,00,60);
END
#
* TREQ - OLD REQUEST TEXT MESSAGE ARRAY.
#
ARRAY TREQ [00:00] S(4);
BEGIN
ITEM TRE$NP C(00,00,07); # NPU NAME #
ITEM TRE$TX1 C(00,42,06) = ["/OLD: "];
ITEM TRE$TX2 C(01,18,17);
ITEM TRE$TX3 C(02,00,10) = [" INITIATED"];
ITEM TRE$ZERO U(03,00,60) = [0];
END
OORD = HDR$OPORD[0];
#
* FIND THE NPUCB ORDINAL VIA THE NOR PARAMETER IN THE CMD.
#
FOUND = FALSE;
FOR I = 0 STEP 1 WHILE NOT FOUND
DO
BEGIN
IF PAR$PCODE[I] EQ "NOR"
THEN
BEGIN
FOUND = TRUE;
NORD = PAR$ORD[I];
END
END
#
* OLD PROGRAM MAY ALREADY BE BUSY WITH ANOTHER OPERATOR. IF SO,
* SEND IN USE MESSAGE TO ORIGIN OPERATOR.
#
#
* SET THE NPU NAME IN THE TEXT MESSAGE.
#
TRE$NP[0] = NPU$NAME[NORD];
SSBTBW(NPU$OVFLGS[NORD],OORD,RUNNING);
IF RUNNING
THEN
BEGIN
TRE$TX2[0] = "ALREADY";
WCB$IAF[1] = TRUE;
END
ELSE
#
* OLD NOT BUSY. SETUP OCB AND NPUCB. SET UP OUTGOING OLDIN SM
* HEADER WORDS.
#
BEGIN
P<FLG$WORD> = LOC(NPU$OVFLGS[NORD]);
SSBSBW(FLG$WORD,OORD);
OC$CNPU[OORD] = NORD;
OC$VERB[OORD] = "TS0";
ABHDN[1] = NPU$NID[NORD];
ABHSN[1] = NPU$HID[NORD];
ABHABT[1] = APPSUP;
ABHBT[1]= APPSUP;
ABHACT[1] = ACTCSNP$;
PFCSFC[1] = OLDIN;
OLDDO[1] = OORD;
ABHTLC[1] = NOLDIN;
WCB$SMID[1] = SMID"OLDIN";
WCB$WC[1] = LOLDIN + 2;
#
* SEND OLDIN SM TO NPU
#
SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
#
* SEND CMD TXT ENTRY TO EVENT PROCESSOR FOR LOGGING INTO NETWORK
* LOG FILE.
#
WCB$WORD[1] = 0;
ABHWORD[1] = 0;
WCB$SMID[1] = SMID"CMDTXT";
ABHADR[1] = OORD;
P<MSCMD> = LOC(CMD$TEXT[0]);
MOVE(HDR$TXWCNT[0],PARMS[0],MSCMD[0]);
CMD$TNAM[0]= OC$TNAM[OORD];
WCB$WC[1] = HDR$TXWCNT[0] + 4;
SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CMDLINE[0]);
#
* SET UP REQUEST INITIATED MESSAGE.
#
TRE$TX2[0] = "REQUEST";
WCB$IAF[1] = FALSE;
END
#
* SET UP THE WORD COUNT WORD AND ABH WORD FOR CNQ ENTRY.
#
WCB$SMID[1] = SMID"TTEXT";
WCB$WC[1] = 6;
ABHWORD[1] = 0;
ABHADR[1] = OORD;
SSTAQE(P<CNQ>,WCBUF[1],ABH[1],TREQ[0]);
END #CSSATR#
TERM