*DECK NVFTDAD USETEXT TEXTNVF USETEXT TXTANVF USETEXT TXTAPSS PROC NVFTDAD((PT),(EC)); # TITLE NVFTDAD - DETERMINE ADDITIONAL DIALOGUE POSSIBILITY # BEGIN # NVFTDAD # # ** NVFTDAD - DETERMINE ADDITIONAL DIALOGUE POSSIBILITY. * * E. THAVIKULWAT 81/11/11 * A. LIM 82/08/04 * * THIS PROCEDURE'S MAIN FUNCTION IS TO ISSUE APPROPRIATE MESSAGE * TO THE TERMINAL AND DETERMINE WHETHER TERMINAL SHOULD BE * PROMPTED ANY FURTHER FOR A NEW APPLICATION. IT IS CALLED INTO * EXECUTION BY THE FOLLOWING PROCEDURES: * *NVFTDSP* *NVFTPSV* *NVFTRCN* * * PROC NVFTDAD((PT),(EC)) * * ENTRY: * PT = POINTER TO PTAC ENTRY * EC = ERROR CODE * 0 = APPLICATION BUSY * 1 = APPLICATION HAS NETTED OFF WITH CONNECTIONS * OUTSTANDING * 2 = APPLICATION HAS FAILED WITH CONNECTIONS * OUTSTANDING * 3 = NIP REFUSED SWITCH * 4 = APPLICATION TERMINATED CONNECTION * 5 = APPLICATION REFUSED CONNECTION * 6 = APPLICATION NOT AVAILABLE * 7 = MULTIPLE CONCURRENT LOGINS ARE PROHIBITED * * EXIT: * ERROR MESSAGE SENT TO TERMINAL. * * NOTES: * NO APPLICATION PROMPT IS REISSUED IF MANDATORY OR IMPLIED * MANDATORY SPECIFIED FOR THE TERMINAL OR USER RESPECTIVELY. * * IF EC = 7 (MULTIPLE CONCURRENT LOGINS PROHIBITED) THEN THE * USER IS SENT AN INFORMATIVE MESSAGE AND THE CONNECTION * IS TERMINATED. * * METHOD: * SEND APPROPRIATE MESSAGE DEPENDING ON EC. IF CONSOLE DEVICE AND * ALL MANDATORY LOGIN PARAMTERS WERE SPECIFIED, START A TIMER IN * ORDER TO REATTEMPT TO SWITCH TO THE APPLICATION IN 30 SECONDS. * IF NOT A CONSOLE DEVICE, AND IF A MANDATORY APPLICATION WAS * SPECIFIED, CALL *NVFTETC* TO END THE CONNECTION. OTHERWISE, * CLEAR APPROPRIATE FIELDS OF THE *PTAC* ENTRY AND SET TERMINAL * STATE TO AWAIT PROMPT. # # **** PROC NVFTDAD -XREF LIST. # XREF BEGIN PROC ABORT; # MACREL - ABORT TASK # PROC MESSAGE; # MESSAGE - ISSUE MESSAGE # PROC NVFTETC; # END TERMINAL CONNECTION # PROC NVFUMQE; # TRANSFER TEXT TO QUEUE # PROC SSCATR; # ACCEPT TIMER REQUEST # END # **** # *CALL TMSGNVF *CALL TERMCLS ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH # ITEM EC I; # ERROR CODE # ITEM LNGTH I; # LENGTH OF MESSAGE # ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC # # * THE FOLLOWING BASED ARRAY IS FOR GENERAL PURPOSE USAGE # BASED ARRAY BPGEN[00:00] S(1); BEGIN ITEM BPG$WORD U(00,00,60); # FULL WORD REFERENCE # END # * TRBBUF - TIMER REQUEST BUFFER. * * BUFFER CONTAINING TIMER INFORMATION. BUFFER IS SET UP TO CONTAIN * THE FC/INACT SM WHICH IS RETURNED TO THE *TAINPQ* WHEN THE TIMER * EXPIRES. # ARRAY TRBBUF [00:00] S(TMBSIZ$); BEGIN ITEM TRB$SMID S:CTQSTAT(00,00,12) = [S"SINA"]; #INTERNAL ID# ITEM TRB$WC U(00,48,12) = [TMBSIZ$]; # ENTRY SIZE # ITEM TRB$ABT U(01,00,06) = [APPCMD]; # APPL BLOCK TYPE # ITEM TRB$CNUM U(01,18,18); # CANCELLATION NUM # ITEM TRB$PFCSFC U(02,00,16) = [FCINA]; # FC/INACT PFCSFC # ITEM TRB$ACN U(02,24,12); # APPL CONN NUMBER # ITEM TRB$DELAY U(03,24,18) = [RTRYTIME$];# DELAY TIME IN SEC # ITEM TRB$QNUM U(03,42,18); # Q NUM FOR FC/INACT# END $BEGIN # * ILGRC - ILLEGAL REASON CODE FROM CR/CRN. # ARRAY ILGRC[00:00] S(4); BEGIN ITEM ILG$MSG C(00,00,34) = [" NVFTDAD - INVALID RC FROM CR/RCN."]; ITEM ILG$ZERO U(03,24,36) = [0]; END $END SWITCH ERRSWT LLABSY, # APPLICATION BUSY # LLANP, # APPLICATION NOT PRESENT # LLAPF, # APPLICATION FAILED # LLARC, # APPLICATION REFUSED CONNECTION # LLATC, # APPLICATION TERMINATED CONNECTION # LLARC, # APPLICATION REFUSED CONNECTION # LLANP, # APPLICATION NOT PRESENT # LLCAP; # MULTIPLE CONCURRENT LOGINS PROHIBITED # GOTO ERRSWT[EC]; LLATC: # APPLICATION TERMINATED CONNECTION # $BEGIN MESSAGE(ILGRC[0], 0); ABORT; $END GOTO LLEND; LLARC: # APPLICATION REFUSED CONN # IF (PTA$APPIND[PT] EQ MNDATRY$) OR (PTA$VDSF[PT]) THEN # MANDATORY/IMPLIED MANDATORY APPLICATION # BEGIN P = LOC(UANPBUF[0]); # USER ACCESS NOT POSSIBLE MSG # LNGTH = LMSG60$; # LENGTH OF MESSAGE # END ELSE # NO MANDATORY/IMPLIED MANDATORY APPL # BEGIN P = LOC(IAMBUF[0]); # ILLEGAL APPLICATION MESSAGE # LNGTH = LMSG40$; # LENGTH OF MESSAGE # END GOTO ENDERR; LLANP: # APPLICATION NOT NETTED ON # P = LOC(ANPBUF[0]); # APPLICATION NOT PRESENT MSG # LNGTH = LMSG30$; # LENGTH OF MESSAGE # GOTO ENDERR; LLAPF: # APPLICATION FAILED # P = LOC(APFBUF[0]); # APPLICATION FAILED MESSAGE # LNGTH = LMSG30$; # LENGTH OF MESSAGE # GOTO ENDERR; LLABSY: # DUP USER OR NO AVAIL CONN NUM # P = LOC(ABSYBUF[0]); # APPLICATION BUSY MESSAGE # LNGTH = LMSG40$; # LENGTH OF MESSAGE # GOTO ENDERR; LLCAP: P = LOC(CANABUF[0]); # CONCURRENT LOGINS PROHIBITED # LNGTH = LMSG50$; ADDR = PTA$ACN[PT]; NVFUMQE(P,BPGEN[0],APPTTX$,ADDR,LNGTH); PTA$CACA[PT] = TRUE; # DON'T SEARCH *RML* TABLE # NVFTETC(PT); GOTO LLEND; ENDERR: # COMMON END PROCESSING # # * SEND MESSAGE THAT WAS SET UP PREVIOUSLY TO THE TERMINAL. # ADDR = PTA$ACN[PT]; NVFUMQE(P,BPGEN[0],APPTTX$,ADDR,LNGTH); # MESSAGE TO QUEUE # # * IF THIS IS A CONSOLE DEVICE TYPE WITH ALL MANDATORY LOGIN * PARAMETERS, START A 30 SECOND TIMER SO THAT NVF CAN TRY TO * RECONNECT THE CONSOLE TO THE DESIRED APPLICATION. # IF (PTA$DT[PT] EQ DT$CONS OR PTA$DT[PT] EQ DT$CLP) AND (PTA$FAMIND[PT] EQ MNDATRY$) AND (PTA$USRIND[PT] EQ MNDATRY$) AND (PTA$APPIND[PT] EQ MNDATRY$) THEN BEGIN TRB$ACN[0] = PTA$ACN[PT]; TRB$QNUM[0] = LOC(P); SSCATR(TRBBUF[0]); PTA$CNUM[PT] = TRB$CNUM[0]; PTA$STATE[PT] = PTACST"AWTAPPL"; GOTO LLEND; END # * IF MANDATORY/IMPLIED MANDATORY APPLICATION IS REQUIRED, NO MORE * PROMPTS ARE ISSUED. # IF (PTA$APPIND[PT] EQ MNDATRY$) OR (PTA$VDSF) THEN # MANDATORY/IMPLIED MANDATORY APPL REQ # BEGIN # * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR. # GOTO TERMCLS [PTA$TC[PT]]; SENDCTRCHAR: # * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT INPUT * MODE. # PFCSFC[1] = CTRCHAR; CTRSTR[1] = 0; # CLEAR REST OF WORD 0 # B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT# NVFUMQE(P,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO Q # NOCTRCHAR: # SEND "LOGGED OUT" MESSAGE # NVFUMQE(P,LOMBUF[0],APPTTX$,ADDR,LMSG20$); NVFTETC(PT,0); # END TERMINAL CONNECTION # END ELSE # NO MANDATORY/IMPLIED MANDATORY APPL REQ # BEGIN # * CLEAR APPROPRIATE FIELDS OF *PTAC* ENTRY AND SET TERMINAL * STATE TO AWAIT APPLICATION PROMPT. # PTA$AWORD[PT] = 0; # CLEAR SWITCH APPLICATION WORD # PTA$VAF[PT] = FALSE; # CLEAR VOLUNTEERED APPL FLAG # PTA$VAWORD[PT] = 0; # CLEAR VOLUNTEERED APPL WORD # PTA$STATE[PT] = PTACST"AWTPRMT"; # SET TERM TO AWAIT PROMPT # END LLEND: END # END NVFTDAD # TERM