*DECK HLSTDX
USETEXT NIPDEF
USETEXT ACB
USETEXT ACNB
USETEXT ACNT
USETEXT APPSTAT
USETEXT AT
USETEXT NWLNTRY
USETEXT OVERLAY
USETEXT PARAMS
USETEXT SUPMSG
PRGM HLSTDX; # PROCESS A HALF/FULL DUPLEX MODE #
BEGIN
*IF DEF,IMS
STARTIMS;
#
*1DC HLSTDX
*
* 1.PROC NAME AUTHOR DATE
* HLSTDX S.KRULEVITCH 79/02/28
*
* 2. FUNCTIONAL DESCRIPTION.
* PROCESS LST/HDX AND LST/FDX SUPERVISORY MESSAGES TO ALLOW
* SELECTION/DESELECTION OF HALF DUPLEX MODE ON/ FULL DUPLEX MODE
*
* 3. METHOD USED.
* DETERMINE OF LST/FDX OR LST/HDX
* NONZERO ACN:
* FOR ALL ACTIVE CONNECTIONS (IF ACN IS ZERO) OR
* FOR A SPECIFIC CONNECTION (IF ACN IS NON-ZERO)
* DO THE FOLLOWING
* UPDATE THE HALF DUPLEX MODE FLAG
* IF FULL DUPLEX - CLEAR THE TEMPORARY LIST OFF FLAG
* IF HALF DUPLEX AND THE INITIAL STATE OF THE
* CONNECTION IS DISABLED - SET THE TEMPORARY
* LIST OFF FLAG (ELSE CLEAR THE TLO FLAG).
* LOCATE ACNB ON NONZERO CONNECTION
* IF ACNB NOT FOUND, RETURN A LOGICAL ERROR
* IF ACNB FOUND
* CLEAR OR SET HALF DUPLEX MODE FLAG
* IF LST/FDX ALSO CLEAR TEMPORARY LIST FLAG
* ZERO ACN:
* CLEAR OR SET HALF DUPLEX FLAG IN ACB
* FOR EACH ACTIVE CONNECTION"S ACNB
* CLEAR OR SET HALF DUPLEX MODE FLAG
* IF LST/FDX ALSO CLEAR TEMPORARY LIST OFF FLAG
*
* 4. ENTRY PARAMETERS.
* ACBADDR CURRENT ACB ADDRESS
* WLADDR CURRENT WORKLIST ENTRY
*
* 5. EXIT PARAMETERS.
* ACNBH HALF DUPLEX MODE FLAG
* ACNBTLO TEMPORARY LIST OFF FLAG
*
* 6. COMDECKS CALLED AND SYMPL TEXTS USED.
* ACB ACNB ACNT APPSTAT AT
* NIPDEF NWLNTRY OVERLAY PARAMS PT
* SUPMSG
*
* 7. ROUTINES AND OVERLAYS CALLED
* HLGLERR OVL ISSUE LOGICAL ERROR
* HUPDDAW UPDATE DATA AVAILABLE WORD
* OVLCALL LOAD OVERLAY
* XTRACE TRACE CALLS
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
*
* W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
*CALL OPSIZE
*
* THIS OVERLAY IS CALLED BY HPPUT.
*
#
STOPIMS;
*ENDIF
#
EXTERNAL VARIABLES
#
XREF
BEGIN
PROC HUPDDAW; # UPDATE DATA AVAILABLE WORD #
PROC OVLCALL; # LOAD OVERLAY #
PROC XTRACE; # TRACE CALLS #
LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
END
#
INTERNAL VARIABLES
#
ITEM HDXFLAG B; # TRUE IF LST/HDX MESSAGE BEING PROCESSED #
ITEM I I; # FOR LOOP VARIABLE #
#**********************************************************************#
CONTROL IFEQ DEBUG,1;
XTRACE("HLSTD") ;
CONTROL FI;
P<NWLENTRY> = WLADDR; # CURRENT WORKLIST ENTRY #
P<SUPMSG> = WLADDR + AIPHSIZE + ABHSIZE;
#
F I N D A C N B - A D D R E S S
#
P<ACB> = ACBADDR;
P<ACNT> = ACBACNT[0];
# LOCATE LST MESSAGE #
IF SFC[0] EQ HDX
THEN # TURN ON HALF DUPLEX MODE #
HDXFLAG = TRUE;
ELSE # TURN ON FULL DUPLEX MODE #
HDXFLAG = FALSE;
IF LSTACN[0] NQ 0
THEN # CHANGE DUPLEX MODE FOR SPECIFIC #
BEGIN # CONNECTION #
P<ACNB> = ACNTACNB[LSTACN[0] + ACNTHSIZE - ACNTMINACN[0]];
IF P<ACNB> EQ 0 OR LSTACN[0]
LS ACNTMINACN[0] OR LSTACN[0]
GR ACNTHCN[0]
THEN # ACNB NOT FOUND #
BEGIN
PARAMS1 = RLG"ACN";# ILLEGAL ACN #
OVLNAME = HLGLERRP;
OVLCALL; # LOAD PROGRAM INTO OVERLAY #
GOTO HLSTDXX;
END
ACNBH[0] = HDXFLAG; # SET OR CLEAR HALF DUPLEX FLAG #
IF NOT HDXFLAG # FULL DUPLEX MODE #
THEN
BEGIN # FULL DUPLEX #
IF ACNBTLO[0]
THEN # CONNECTION CURRENTLY IN TEMP LIST OFF #
BEGIN
ACNBTLO[0] = FALSE; # CLEAR TEMP LIST OFF CONDITION #
HUPDDAW(P<ACB>,P<ACNB>,0,ACNBBLKSQ[0]);
END
END # FULL DUPLEX #
ELSE
BEGIN # HALF DUPLEX #
IF LSTDIS[0]
THEN # CHECK INITIALLY LIST STATE FLAG #
BEGIN # SET TLO #
IF NOT ACNBTLO[0] # WAS TEMP LIST ON CONDITION #
THEN
BEGIN
HUPDDAW(P<ACB>,P<ACNB>,0,-ACNBBLKSQ[0]);
END
ACNBTLO[0] = TRUE ;
END # SET TLO #
ELSE
BEGIN
IF ACNBTLO[0]
THEN # CONNECTION IN TEMP LIST OFF CONDITION #
BEGIN
ACNBTLO[0] = FALSE; # CLEAR TEMP LIST OFF CONDITION #
HUPDDAW(P<ACB>,P<ACNB>,0,ACNBBLKSQ[0]); # UPDATE DELIVER#
END
END
END # HALF DUPLEX #
END
ELSE # CHANGE DUPLEX MODE ON ALL TERMINAL #
BEGIN # APPLICATION CONNECTIONS #
ATH[ACBAN[0]] = HDXFLAG;
ATDIS[ACBAN[0]] = LSTDIS[0] ; # SET INITIAL LIST STATE FLAG #
# LOOP THROUGH ACTIVE CONNECTIONS #
FOR I = ACNTHSIZE STEP 1
UNTIL ACNTHCN[0] + ACNTHSIZE - ACNTMINACN[0]
DO
BEGIN
IF ACNTACNB[I] NQ 0
THEN # ACTIVE CONNECTION #
BEGIN
P<ACNB> = ACNTACNB[I];
ACNBH[0] = HDXFLAG; # SET OR CLEAR HALF DUPLEX FLAG#
IF NOT HDXFLAG
THEN # FULL DUPLEX MODE #
BEGIN # FULL DUPLEX MODE #
IF ACNBTLO[0]
THEN # CONNECTION IN TEMP LIST OFF CONDITION #
BEGIN
ACNBTLO[0] = FALSE; # CLEAR TEMP LIST OFF FLAG #
HUPDDAW(P<ACB>,P<ACNB>,0,ACNBBLKSQ[0]); # UPDATE DELIV#
END
END # FULL DUPLEX MODE #
ELSE
BEGIN # HALF DUPLEX MODE #
IF LSTDIS[0] #CHECK INITIAL LIST STATE #
THEN
BEGIN
HUPDDAW(P<ACB>,P<ACNB>,0,-ACNBBLKSQ[0]); # UPDATE DEL#
ACNBTLO[0] = TRUE; # FLAG,IF SET, SET TLO FLAG #
END
ELSE
BEGIN
IF ACNBTLO[0]
THEN # CONNECTION IN TEMP LIST OFF CONDITIO#
BEGIN
ACNBTLO[0] = FALSE; # CLEAR TEMP LIST OFF FLAG #
HUPDDAW(P<ACB>,P<ACNB>,0,ACNBBLKSQ[0]); # UPDATE D#
END
END
END # HALF DUPLEX MODE #
END
END
END
HLSTDXX:
GOTO RJMAIN;
END # HLSTDX #
TERM