*DECK NVFTETC USETEXT TEXTNVF USETEXT TEXTSS USETEXT TXSMNVF USETEXT TXTANVF USETEXT TXTAPSS USETEXT TXTSUSS PROC NVFTETC((PT)); # TITLE NVFTETC - END TERMINAL CONNECTION # BEGIN # NVFTETC # # ** NVFTETC - END TERMINAL CONNECTION. * * E. THAVIKULWAT 81/11/13 * * THIS PROCEDURE'S MAIN FUNCTION IS TO TERMINATE THE CONNECTION AND * DELETE ITS ASSOCIATED TABLE(S). IT IS CALLED INTO EXECUTION BY * THE FOLLOWING PROCEDURES: * *NVFTCB* *NVFTCRN* *NVFTDAD* *NVFTINA* *NVFTITE* * *NVFTPUV* *NVFTRVD* *NVFTVVD* * * PROC NVFTETC((PT)) * * ENTRY: * PT = POINTER TO PTAC ENTRY * * EXIT: * CONNECTION TERMINATED. * * NOTES: * 1) NO CR/TRM SM IS ISSUED IF THE CONNECTION DOES NOT BELONG TO * NVF (ACN = 0). * 2) NON-ZERO USER INDEX AND INCREMENT FAMILY COUNT FLAG NOT SET * INDICATES NON-INITIAL LOGIN. * * METHOD: * DECREMENT FAMILY COUNT AND ISSUE *AEUN* ACCOUNT DAYFILE MESSAGE. * SEND CR/TRM SM IF ACN NON-ZERO (NVF'S CONNECTION). FOR * SYNCHRONOUS INTERACTIVE DEVICES, DELETE IT'S ENTRY FROM THE * *PDCT* TABLE. RETURN THE VCB ORDINAL AND DELETE IT'S *PTAC* * ENTRY. IF THE USER IS NOT ALLOWED MULTIPLE CONCURRENT LOGINS, * REMOVE IT'S ENTRY FROM THE *RML* TABLE. # # **** PROC NVFTETC - XREF LIST. # $BEGIN XREF BEGIN PROC ABORT; # ABORT NVF JOB # PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE # END $END XREF BEGIN PROC NVFUFVO; # FREE VCB ORDINAL # PROC NVFTIAM; # ISSUE ACCOUNT DAYFILE MESSAGE # PROC NVFTURL; # UPDATE THE RESTRICT LOGIN TABLE # PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE # PROC SSTRTS; # REMOVE TABLE SPACE # END # **** # ITEM LNGTH I; # LENGTH OF MESSAGE # ITEM NAME C(7); # NAME TO SEARCH *PDCT* FOR # ITEM ORD I; # *PDCT* ORDINAL TO REMOVE SPACE AT # ITEM PC I; # *PDCT* ENTRY (CONSOLE) ORDINAL # ITEM PD I; # *PDCT* PASSIVE DEVICE ORDINAL # ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC # ITEM WC I; # NUMBER OF WORDS TO DELETE FROM *PDCT* # $BEGIN # * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT * FINDING AN EXPECTED PDCT ENTRY. # ARRAY DAYMSG[00:00] S(5); BEGIN ITEM DAY$MSG1 C(00,00,27) = ["NVFTETC - CANNOT FIND PDCT "]; ITEM DAY$MSG2 C(02,42,17) = ["ENTRY FOR TERMNAM"]; ITEM DAY$TNAME C(03,42,07); # TERMINAL NAME # END $END # * SECURITY COUNT FLAG NOT SET AND USER INDEX NON-ZERO INDICATES A * VALID USER AND THAT FAMILY COUNT HAS BEEN INCREMENTED. * THEREFORE, FAMILY COUNT MUST BE DECREMENTED PRIOR TO TERMINATION. # IF (PTA$DT[PT] EQ DT$CONS) OR (PTA$DT[PT] EQ DT$CLP) OR (PTA$DT[PT] EQ DT$USER) THEN # INTERACTIVE DEVICES # BEGIN IF (PTA$UIDX[PT] NQ 0) AND (NOT PTA$SCEF[PT]) THEN # VALID USER # BEGIN P = LOC(MSGBUF[0]) + ((NMSGBUF$ + 1) / 2); CRQ$FCWORD[0] = 0; # CLEAR CPM REQUEST BUFFER # CRQ$FWORD[0] = 0; CRQ$FC[0] = CPM73B$; # DECREMENT FAMILY COUNT # CRQ$ACN[0] = 0; CRQ$FNAM[0] = PTA$FNAM[PT]; LNGTH = CRQDSIZ$ * 10; NVFUMQE(P,CRQBUF[0],APPTTX$,0,LNGTH); # REQ TO QUEUE # IF (NOT PTA$CACA[PT]) AND (NOT PTA$INVPID[PT]) # MULT CONCNT # AND (PTA$PROMPT[PT] NQ AWTPID$) # LOGINS PROHIB AND VALID# THEN # USER AND NOT WAITING FOR PID # NVFTURL(PT); # REMOVE THE *RML* ENTRY # # * DETERMINE IF *AEUN* ACCOUNT DAYFILE MESSAGE MUST BE ISSUED. * MESSAGE IS ISSUED ONLY IF THE *ABUN* (SUCCESSFUL USER LOGIN) * ACCOUNT DAYFILE MESSAGE HAS BEEN ISSUED. # IF (PTA$PROMPT[PT] EQ AWTAPP$) OR (NOT PTA$IUVF[PT]) THEN # MUST ISSUE *AEUN* ACOUNT MSG # BEGIN NVFTIAM(PT,AEUN$); # ISSUE *AEUN* ACCOUNT MESSAGE # END END END # * BUILD CR/TRM SM ONLY IF ACN IS NON-ZERO (NVF'S CONNECTIONS). # IF PTA$ACN[PT] NQ 0 THEN # MUST SEND CR/TRM SM # BEGIN SPMSG0[1] = 0; # CLEAR RESPONSE AREA # PFCSFC[1] = CRTRM; CRRTRM[1] = PTA$RC[PT]; CRACN[1] = PTA$ACN[PT]; NVFUMQE(P,APSM[1],APPPR$,0,LCRTRM); # TRANSFER SM TO Q # END # * FOR SYNCHRONOUS DEVICES, DELETE ITS ENTRY FROM THE *PDCT* TABLE. * FOR CONSOLES THIS MEANS DELETE THE ENTIRE ENTRY. FOR PASSIVE * DEVICES THIS MEANS DELETE THE SINGLE WORD FOR THE PASSIVE DEVICE. # IF PTA$TC[PT] GQ TC9$ # SYNCHRONOUS DEVICE # THEN BEGIN IF PTA$DT[PT] NQ DT$CONS AND PTA$DT[PT] NQ DT$USER THEN # PASSIVE DEVICE # NAME = PTA$OCN[PT]; # WILL SEARCH FOR OWNING CONSOLE# ELSE # CONSOLE # NAME = PTA$TN[PT]; PDT$CN[PDTLNGTH] = NAME; # INSURE LOOP TERMINATION # FOR PC=0 STEP PDT$WC[PC] WHILE PDT$CN[PC] NQ NAME DO # FIND CORRECT *PDCT* ENTRY # BEGIN END ORD = PC; WC = PDT$WC[PC]; PD = 0; IF PC LS PDTLNGTH AND PTA$DT[PT] NQ DT$CONS AND PTA$DT[PT] NQ DT$USER THEN # MUST SEARCH FOR PASS DEV WORD # BEGIN FOR PD = PC+PDCTSIZ$ STEP 1 WHILE PDT$PN[PD] NQ PTA$TN[PT] AND PD LS PC+WC DO # FIND PASS DEV WD IN PDCT NTRY # BEGIN END ORD = PD; WC = 1; END $BEGIN IF PC GQ PDTLNGTH AND (PTA$DT[PT] EQ DT$CONS OR PTA$DT[PT] EQ DT$USER) THEN # NO *PDCT* ENTRY FOR CONSOLE # BEGIN DAY$TNAME[0] = PTA$TN[PT]; MESSAGE (DAYMSG, 0); ABORT; END $END IF PC LS PDTLNGTH AND PD LS PC+PDT$WC[PC] THEN # MUST DELETE SPACE IN *PDCT* # BEGIN SSTRTS (P, ORD, WC); IF WC EQ 1 THEN PDT$WC[PC] = PDT$WC[PC] - 1; END END # SYNCHRONOUS DEVICE LOGIC # # * RETURN THE VCB ORDINAL AND DELETE *PTAC* ENTRY. # NVFUFVO(PTA$VCB[PT]); # FREE UP THE VCB ORDINAL # PT = PT * PTACSIZ$; SSTRTS(P,PT,PTACSIZ$); # DELETE PTAC ENTRY # END # END NVFTETC # TERM