*DECK NVFTSPC
USETEXT TEXTSS
USETEXT TEXTNVF
USETEXT TXTANVF
USETEXT TXSMNVF
USETEXT TXTAPSS
USETEXT TXTSUSS
PROC NVFTSPC;
# TITLE - NVFTSPC - T-A SWITCH PENDING CONNECTIONS #
BEGIN # NVFTSPC #
#
** NVFTSPC - TA SWITCH PENDING CONNECTIONS.
*
* C. BRION 83/04/18.
*
* THIS PROCEDURE CHECKS FOR PENDING TA CONNECTIONS AND EITHER RE-
* STARTS THE LOGIN DIALOGUE OR CAUSES THE CONNECTIONS TO BE TER-
* MINATED OR CAUSES THE CONNECTIONS TO BE SWITCHED TO THE REQUEST
* STARTED APPLICATION.
*
* PROC NVFTSPC
*
* ENTRY:
* THE NETON NORMAL OR ABNORMAL RESPONSE RESIDES IN MSGBUF,
* ABHBUF AND WCBUF.
*
* EXIT:
* PENDING PTAC ENTRIES MAY BE CAUSED TO BE TERMINATED.
* PENDING PTAC ENTRIES MAY BE CAUSED TO BE SWITCHED.
* PENDING PTAC ENTRIES MAY BE CAUSED TO RESTART THE DIALOGUE
* SEQUENCE.
*
#
#
**** PROC NVFTSPC XREF LIST
#
XREF
BEGIN
PROC NVFTDAD; # DETERMINE DIALOGUE #
PROC NVFTILP; # ISSUE LOGIN PROMPT #
PROC NVFTDSP; # DETERMINE SWITCH #
PROC NVFSCAD; # COMPLETE AP DEPARTURE #
END
#
****
#
ITEM SECAST B; # SECONDARY AST EXISTS #
ITEM PTENTRY I; # NUMBER PTAC ENTRIES #
ITEM ASENTRY I; # NUMBER AST ENTRIES #
ITEM MATCH B; # LOOP EXIT FLAG #
ITEM AORD I; # AST ORDINAL OF NETON APPL #
ITEM PT I; # PTAC ENTRY ORDINAL #
ITEM PORD I; # PRIMARY AST ENTRY ORDINAL #
ITEM ERRCODE I; # NVFTDAD ERROR CODE #
ITEM PD I; # PDCT ENTRY ORDINAL #
CONTROL EJECT;
#
* INITIALIZE FLAGS AND NUMBER ENTRIES IN PTAC AND AST TABLES.
#
SECAST = FALSE;
PTENTRY = PTALNGTH/PTACSIZ$;
ASENTRY = ASTLNGTH/ASTSIZ$;
MATCH = FALSE;
#
* SEARCH FOR AST ENTRY THAT MATCHES APPLICATION NUMBER OF THE
* NET ON RESPONSE.
#
FOR AORD = 0 STEP 1 WHILE
(AORD LS ASENTRY AND
NOT MATCH)
DO
BEGIN
IF AST$AN[AORD] EQ NETAN[0]
THEN
BEGIN
MATCH = TRUE;
#
* CHECK IF AST ENTRY IS SECONDARY. IF SO, SEARCH FOR THE PRIMARY
* AST ENTRY.
#
IF AST$PANAM[AORD] NQ AST$SANAM[AORD]
THEN
BEGIN
#
* SECONDARY AST ENTRY. LOCATE PRIMARY.
#
FOR PORD = 0 STEP 1 WHILE
(PORD LS ASENTRY AND
AST$PANAM[PORD] NQ AST$SANAM[AORD])
DO
BEGIN
END
END
ELSE
PORD = AORD;
#
* AST ENTRY FOUND. LOCATE EACH PTAC ENTRY THAT IS PENDING NETON FOR
* THIS AST ENTRY AND IS EITHER A CONSOLE DEVICE TYPE OR A PSU
* PRINTER WHICH IS CONNECTED TO CDCNET.
#
FOR PT = 0 STEP 1 WHILE PT LS PTENTRY
DO
BEGIN
IF ( (PTA$SWTAPP[PT] EQ AST$PANAM[PORD] ) AND
( (PTA$DT[PT] EQ DTSTAT"SCON") OR
(PTA$DT[PT] EQ DTSTAT"SCLP") ) AND
(PTA$STATE[PT] EQ PTACST"AWTNETP" ) )
THEN
BEGIN
#
* FOR EACH PTAC, CLEAR TIMER CANCELLATION NUMBER.
#
PTA$CNUM[PT] = 0;
#
* CHECK IF NET ON RESPONSE IS ABNORMAL OR NORMAL.
#
IF PFCSFC[0] EQ NETONA
THEN
BEGIN
#
* NET ON ABNORMAL RESPONSE. SET UP ERROR CODE FOR NVFTDAD IN ORDER
* TO DETERMINE THE DIALOGUE NEEDED FOR THE CONNECTION AFTER AN
* APPLICATION NOT PRESENT SITUATION. IF THE CONNECTION IS TO CON-
* TINUE LOGIN SEQUENCE, CALL NVFTILP TO RESTART THE LOGIN SEQUENCE.
#
ERRCODE = ECANP$;
NVFTDAD(PT,ERRCODE);
IF PTA$STATE[PT] EQ PTACST"AWTPRMT"
THEN
NVFTILP(PT);
END
ELSE # NET ON NORMAL RESPONSE #
BEGIN
#
* NET ON NORMAL RESPONSE. CALL NVFTDSP TO DETERMINE SWITCH POS-
* SIBILITY.
#
PD = 0;
NVFTDSP(PT,PD);
END
END
END
#
* IF NET ON ABNORMAL, THEN CALL NVFSCAD TO COMPLETE APPLICATION
* DEPARTURE OF AST ENTRY.
#
IF PFCSFC[0] EQ NETONA
THEN
BEGIN
NVFSCAD(AORD);
IF PORD NQ AORD
THEN
NVFSCAD(PORD);
END
END
END
END # NVFTSPC #
TERM