*DECK CSCANT
USETEXT TEXTCS
USETEXT TEXTSS
USETEXT TXTAPSS
PROC CSCANT;
# TITLE CSCANT - ACCEPT NOP TYPEIN. #
BEGIN # CSCANT #
#
** CSCANT - ACCEPT NOP TYPEIN.
*
* D. G. DEPEW. 81/06/05.
*
* THIS PROCEDURE HANDLES INBOUND DATA (SYNCHRONOUS) BLOCKS FROM THE
* NETWORK. ITS FUNCTION IS TO FORWARD THE TYPEIN TO THE I-LAYER
* (FOR COMMAND PROCESSING) OR DISCARD IT, AS APPROPRIATE.
*
* ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
* TRAFFIC QUEUE (*CNQ*) ENTRY.
* ABHBUF[0] = APPLICATION BLOCK (EVENT) HEADER FOR THE DATA
* (BASED ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
* MSGBUF[0] = DISPLAY CODED TEXT LINE (BASED ARRAY *APSM*
* IN *TXTAPSS* POINTS HERE).
*
* EXIT ONE OF THE FOLLOWING:
* - AN ENTRY FOR THE TYPEIN IS PLACED IN THE OPERATOR
* TYPEIN QUEUE (*OPTQ*) AND THE STATE IS UPDATED.
* - THE TYPEIN IS IGNORED.
* - THE TYPEIN IS DISGARDED AND A TERMINAL TEXT ENTRY
* CONTAINING THE MESSAGE *INPUT IGNORED..* IS PLACED IN
* CONNECTION TRAFFIC QUEUE (*CNQ*).
*
* NOTES 1. CS ONLY PROCESSES *MSG* TYPE NETWORK BLOCKS. ANY
* OTHER TYPE OF SYNCHRONOUS INBOUND DATA (*BLK* BLOCKS
* AND TRANSPARENT MODE INPUT) IS IGNORED AND THE MESSAGE
* *INPUT IGNORED..* IS SENT TO THE TERMINAL.
* 2. THE PROCESSING IS DEFINED BY THE CS/NOP C-LAYER STATE
* DIAGRAM.
#
#
**** PROC CSCANT - XREF LIST.
#
XREF
PROC SSTAQE; # ACCEPT QUEUE ENTRY #
#
****
#
DEF IGTLW$ #2#; # *INPUT IGNORED..* TEXT LENGTH IN WORDS #
ITEM NACN; # NOP ACN = ORDINAL OF ACN LIST ENTRY #
#
* ABH AND SM BODY ARRAYS FOR LST/ON/SM.
#
ARRAY LONABH [00:00] S(1);
BEGIN
ITEM LOH$ABT U(00,00,06) = [APPCMD]; # BLOCK TYPE #
ITEM LOH$ADRABN U(00,06,30) = [0]; # ADDR, BLOCK NR #
ITEM LOH$ACT U(00,36,04) = [CT60TRANS]; # CHARACTER TYPE #
ITEM LOH$DBC U(00,40,08) = [0]; # CLARIFIER #
ITEM LOH$TLC U(00,48,12) = [LLST]; # TEXT LENGTH #
END
ARRAY LONSM [00:00] S(1);
BEGIN
ITEM LOM$PSFC U(00,00,16) = [LSTON]; # PFC/SFC #
ITEM LOM$RES1 U(00,16,08) = [0]; # RESERVED #
ITEM LOM$ACN U(00,24,12); # CONNECTION NUM #
ITEM LOM$RES2 U(00,36,24) = [0]; # RESERVED #
END
ARRAY IGNORE [00:00] S(IGTLW$);
BEGIN
ITEM I$TEXT C(00,00,15) = ["INPUT IGNORED.."];
ITEM I$ZERO U(01,30,30) = [0];
END
#
* SAVE THE NOP'S ACN NUMBER. TAKE A MAIN BRANCH DEPENDING UPON THE
* APPLICATION BLOCK TYPE.
#
NACN = ABHADR[0];
IF ABHABT[0] EQ APMSG
THEN # MUST PROCESS THIS BLOCK #
BEGIN
#
* IF THE CONNECTION IS ACTIVE, FORWARD THE TYPEIN TO THE I-LAYER
* AND SET THE STATE OF THE CONNECTION TO INDICATE THAT A COMMAND
* IS IN PROGRESS. HOWEVER, IF THE CANCEL INPUT FLAG IS SET,
* IGNORE THE TYPEIN AND ISSUE A LST/ON/SM TO TURN AROUND THE
* HALF DUPLEX OPERATION. DISCARD THE TEXT FOR ANY OTHER STATE.
#
IF ACN$NOPST[NACN] EQ S"ACTIVE"
THEN # ALL IS WELL #
BEGIN
IF ABHCAN[0] NQ 0
THEN # HOP HAS CANCELLED TYPEIN #
BEGIN
WCB$WORD[1] = LLST + 2;
LOM$ACN[0] = NACN;
SSTAQE (P<OTQ>, WCBUF[1], LONABH[0], LONSM[0]);
END
ELSE
BEGIN
SSTAQE (P<OPTQ>, WCBUF[0], ABHBUF[0], MSGBUF[0]);
ACN$NOPST[NACN] = S"COMMAND";
END
END
#
* IF THE CONNECTION IS IN THE CLEAR INPUT STATE, THEN SEND A
* LST/ON/R TO GET THE NEXT MSG BLOCK.
#
ELSE IF ACN$NOPST[NACN] EQ S"CLEARI"
THEN
BEGIN
WCB$WORD[1] = LLST + 2;
LOM$ACN[0] = NACN;
SSTAQE(P<OTQ>, WCBUF[1], LONABH[0], LONSM[0]);
END
END # *MSG* BLOCK #
ELSE # UNACCEPTABLE INPUT #
BEGIN
#
* DISCARD THE INPUT BLOCK. IF IT IS A *BLK* BLOCK OR TRANSPARENT
* INPUT, AND THE CONNECTION IS ACTIVE, SEND THE *INPUT IGNORED..*
* MESSAGE. (I.E., DON'T SEND THE MESSAGE FOR OTHER CONDITIONS
* SUCH AS A NULL BLOCK WITH THE BREAK OCCURRED FLAG SET.)
#
IF ACN$NOPST[NACN] EQ S"ACTIVE"
AND (ABHABT[0] EQ APPBLK OR ABHXPT[0] EQ 1)
THEN
BEGIN
WCB$WORD[1] = IGTLW$ + 2; # TERM TEXT NTRY SIZ, IAF=FALSE #
WCB$SMID[1] = SMID"TTEXT";
SSTAQE (P<CNQ>, WCBUF[1], ABHBUF[0], IGNORE);
END
END # UNACCEPTABLE INPUT #
END # CSCANT #
TERM