cdc:nos2.source:nam5871:csstno
Table of Contents
CSSTNO
Table Of Contents
- [00007] PROC CSSTNO
- [00008] TERMINATE NPU OPERATOR.
- [00011] TERMINATE NPU OPERATOR.
- [00031] PROC SSBCBW
- [00032] PROC SSBTBW
- [00033] PROC SSTAQE
Source Code
- CSSTNO.txt
- *DECK CSSTNO
- USETEXT TEXTCS
- USETEXT TEXTSS
- USETEXT TXTAPSS
- USETEXT TXTSMCS
- USETEXT TXTSUSS
- PROC CSSTNO;
- # TITLE - TERMINATE NPU OPERATOR. #
- BEGIN
- #
- ** CSSTNO - TERMINATE NPU OPERATOR.
- *
- * D.K. ENDO 82/03/10
- *
- * THIS PROCEDURE DOES I-LAYER CLEAN-UP WHEN A CONNECT BROKEN/
- * INACTIVE IS DETECTED.
- *
- * PROC CSSTNO
- *
- * ENTRY 1. CON/CB, CON/CB WARNING, OR FC/INACT SM
- *
- * EXIT 2. NPUCB-S AND OCB-S ASSOCIATED WITH OPERATOR ON
- * CONNECTION ARE CLEARED.
- *
- #
- #
- **** PROC CSSTNO - XREF LIST BEGINS.
- #
- XREF
- BEGIN
- PROC SSBCBW; # CLEAR BIT IN WORD #
- PROC SSBTBW; # TEST BIT IN WORD #
- PROC SSTAQE; # ADD QUEUE ENTRY #
- END
- #
- ****
- #
- ITEM I; # LOOP INDUCATION VARIABLE #
- ITEM SEND B; # SEND PENDING INDICATOR #
- ITEM RUNNING B; # ONLINE DIAGNOSTICS RUNNING FLAG #
- ITEM TNAME C(10); # TERMINAL NAME #
- #
- * FLG$WORD - THIS BASED ARRAY POINTS TO THE SEND AND/OR STATUS
- * REQUEST PENDING BIT MAP.
- #
- BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
- BEGIN
- ITEM FW$WORD I(00,00,60);
- END
- CONTROL EJECT;
- # #
- # CSSTNO CODE BEGINS HERE #
- # #
- #
- * IF THE OCB STATE IS SET AND IT IS NOT THE CASE THAT THIS SM IS
- * FC/INACT WITH THE NO TIME OUT FLAG SET, THEN PROCEED WITH
- * CLEAN UP OPERATIONS FOR THE CONNECTION.
- *
- #
- IF OC$STATE[ABHADR[0]] AND
- NOT (WCB$SMID[0] EQ SMID"FCINA" AND OC$NTO[ABHADR[0]])
- THEN
- BEGIN
- #
- * SEARCH THE NPUCB-S TO SEE IF THIS OPERATOR IS A CURRENT ON-LINE
- * DIAGNOSTICS OPERATOR. IF SO, THEN SEND AN OLD/TM TO TERMINATE
- * THE PROCESSING AND CLEAR THE CURRENT-OLD-OPERATOR.
- #
- FOR I=0 STEP 1 WHILE I LS CSNPCNT
- DO
- BEGIN
- P<FLG$WORD> = LOC(NPU$OVFLGS[I]);
- SSBTBW(FLG$WORD,ABHADR[0],RUNNING);
- IF RUNNING
- THEN
- BEGIN
- WCB$WORD[1] = 0;
- WCB$SMID[1] = SMID"OLDTM";
- WCB$WC[1] = 2 + LOLDIN;
- ABHWORD[1] = 0;
- ABHABT[1] = APPSUP;
- ABHDN[1] = NPU$NID[I];
- ABHSN[1] = NPU$HID[I];
- ABHBT[1] = NETCMD;
- ABHACT[1] = CT8ASCII;
- ABHTLC[1] = NOLDIN;
- SPMWD[1] = 0;
- PFCSFC[1] = OLDTM;
- OLDDO[1] = ABHADR[0];
- SSBCBW(FLG$WORD,ABHADR[0]);
- SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
- END
- END
- #
- * SEARCH THE NPUCB-S AND FOR EACH NPU CONTROLLED BY THIS
- * OPERATOR, CLEAR THE CONTROLLING NOP FIELD, SEND AN EVENT
- * INDICATING LOSE OF CONTROL, AND IF THERE IS AN OPERATOR WITH
- * AUTO CONTROL STATUS, THEN GIVE THAT OPERATOR CONTROL.
- #
- IF CSACNOP EQ ABHADR[0]
- THEN
- BEGIN
- CSACNOP = 0;
- END
- FOR I=0 STEP 1 WHILE I LS CSNPCNT
- DO
- BEGIN
- IF NPU$STAT[I] EQ SUPSTAT"SUP" AND
- NPU$CNOP[I] EQ ABHADR[0]
- THEN
- BEGIN
- WCB$WORD[1] = 3;
- WCB$SMID[1] = SMID"CTRLOFF";
- ABHSN[1] = I;
- TNAME = OC$TNAM[NPU$CNOP[I]];
- SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
- NPU$CNOP[I] = 0;
- IF CSACNOP NQ 0
- THEN
- BEGIN
- NPU$CNOP[I] = CSACNOP;
- WCB$WORD[1] = 3;
- WCB$SMID[1] = SMID"CTRLON";
- ABHSN[1] = I;
- TNAME = OC$TNAM[CSACNOP];
- SSTAQE(P<EVQ>,WCBUF[1],ABH[1],TNAME);
- END
- END
- END
- #
- * IF THE CURRENT COMMAND IS -STATUS-, THEN IF CURRENT COMMAND NPU1
- * IS NON-ZERO, CLEAN UP THINGS FOR NPU1, IF CURRENT COMMAND NPU2 IS
- * NON-ZERO, CLEAN UP THINGS FOR NPU2. CLEAR THE AFFECTED NPU COUNT
- * AND CURRENT COMMAND VERB. MAKE AN ENTRY IN THE EVENT QUEUE WITH
- * THE EVENT CODE SET TO -STATUS FINISHED-.
- #
- IF OC$VERB[ABHADR[0]] EQ "ST0"
- THEN
- BEGIN
- IF OC$CNPU[ABHADR[0]] NQ 0
- THEN
- BEGIN
- NPU$OPST[OC$CNPU[ABHADR[0]]] = MAXACN$ + 1;
- OC$CNPU[ABHADR[0]] = 0;
- END
- P<FLG$WORD> = LOC(NPU$STFLGS[0]);
- FOR I=0 STEP 1 WHILE I LS CSNPCNT
- DO
- BEGIN
- SSBCBW(FLG$WORD[I],ABHADR[0]);
- END
- OC$VERB[ABHADR[0]] = " ";
- OC$NCNT[ABHADR[0]] = 0;
- WCB$WORD[1] = 0;
- WCB$SMID[1] = SMID"STUFIN";
- WCB$WC[1] = 2;
- ABHWORD[1] = ABHWORD[0];
- ABHTLC[1] = 0;
- SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
- END
- #
- * IF THE CURRENT COMMAND VERB IS -SE0-, THEN CLEAR THE CURRENT SEND
- * OPERATOR, CURRENT COMMAND NPU1, AND COMMAND VERB, AND SEND A NULL
- * TEXT TO THE TERMINAL WITH INPUT ALLOWED FLAG SET.
- #
- ELSE IF OC$VERB[ABHADR[0]] EQ "SE0"
- THEN
- BEGIN
- P<FLG$WORD> = LOC(NPU$SDFLGS[0]);
- FOR I=0 STEP 1 WHILE I LS CSNPCNT
- DO
- BEGIN
- SSBTBW(FLG$WORD[I],ABHADR[0],SEND);
- IF SEND
- THEN
- BEGIN
- SSBCBW(FLG$WORD[I],ABHADR[0]);
- NPU$OPSD[I] = MAXACN$ + 1;
- END
- END
- OC$CNPU[ABHADR[0]] = 0;
- OC$NCNT[ABHADR[0]] = 0;
- OC$VERB[ABHADR[0]] = " ";
- WCB$WORD[1] = 0;
- WCB$SMID[1] = SMID"TTEXT";
- WCB$IAF[1] = TRUE;
- WCB$WC[1] = 2;
- ABHWORD[1] = 0;
- ABHADR[1] = ABHADR[0];
- SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
- END
- #
- * IF THIS SM IS A CON/CB WARNING, THEN SET THE CB PENDING FLAG IN
- * THE OCB FOR THIS OPERATOR, OTHERWISE PUT A CON/END/R SM IN THE
- * PROTOCOL RESPONSE QUEUE. CLEAR THE OCB.
- #
- IF WCB$SMID[0] EQ SMID"CONCBW"
- THEN
- BEGIN
- OC$CBPD[ABHADR[0]] = TRUE;
- END
- ELSE
- BEGIN
- WCB$WORD[1] = 0;
- WCB$SMID[1] = SMID"CONENDR";
- WCB$WC[1] = 2;
- ABHWORD[1] = 0;
- ABHADR[1] = ABHADR[0];
- SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
- OC$WORD[ABHADR[0]] = 0;
- OC$ORD[ABHADR[0]] = ABHADR[0];
- I = OC$TYPE[ABHADR[0]];
- OC$WORD1[ABHADR[0]] = 0;
- OC$TYPE[ABHADR[0]] = I;
- OC$WORD2[ABHADR[0]] = 0;
- END
- END
- RETURN; # **** RETURN **** #
- END # CSSTNO #
- TERM
cdc/nos2.source/nam5871/csstno.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator