User Tools

Site Tools


cdc:nos2.source:nam5871:nvftetc

NVFTETC

Table Of Contents

  • [00009] PROC NVFTETC1)
  • [00010] NVFTETC - END TERMINAL CONNECTION
  • [00014] END TERMINAL CONNECTION.
  • [00054] PROC ABORT
  • [00055] PROC MESSAGE
  • [00061] PROC NVFUFVO
  • [00062] PROC NVFTIAM
  • [00063] PROC NVFTURL
  • [00064] PROC NVFUMQE
  • [00065] PROC SSTRTS

Source Code

NVFTETC.txt
  1. *DECK NVFTETC
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7. USETEXT TXTSUSS
  8.  
  9. PROC NVFTETC((PT));
  10. # TITLE NVFTETC - END TERMINAL CONNECTION #
  11.  
  12. BEGIN # NVFTETC #
  13. #
  14. ** NVFTETC - END TERMINAL CONNECTION.
  15. *
  16. * E. THAVIKULWAT 81/11/13
  17. *
  18. * THIS PROCEDURE'S MAIN FUNCTION IS TO TERMINATE THE CONNECTION AND
  19. * DELETE ITS ASSOCIATED TABLE(S). IT IS CALLED INTO EXECUTION BY
  20. * THE FOLLOWING PROCEDURES:
  21. * *NVFTCB* *NVFTCRN* *NVFTDAD* *NVFTINA* *NVFTITE*
  22. * *NVFTPUV* *NVFTRVD* *NVFTVVD*
  23. *
  24. * PROC NVFTETC((PT))
  25. *
  26. * ENTRY:
  27. * PT = POINTER TO PTAC ENTRY
  28. *
  29. * EXIT:
  30. * CONNECTION TERMINATED.
  31. *
  32. * NOTES:
  33. * 1) NO CR/TRM SM IS ISSUED IF THE CONNECTION DOES NOT BELONG TO
  34. * NVF (ACN = 0).
  35. * 2) NON-ZERO USER INDEX AND INCREMENT FAMILY COUNT FLAG NOT SET
  36. * INDICATES NON-INITIAL LOGIN.
  37. *
  38. * METHOD:
  39. * DECREMENT FAMILY COUNT AND ISSUE *AEUN* ACCOUNT DAYFILE MESSAGE.
  40. * SEND CR/TRM SM IF ACN NON-ZERO (NVF'S CONNECTION). FOR
  41. * SYNCHRONOUS INTERACTIVE DEVICES, DELETE IT'S ENTRY FROM THE
  42. * *PDCT* TABLE. RETURN THE VCB ORDINAL AND DELETE IT'S *PTAC*
  43. * ENTRY. IF THE USER IS NOT ALLOWED MULTIPLE CONCURRENT LOGINS,
  44. * REMOVE IT'S ENTRY FROM THE *RML* TABLE.
  45. #
  46.  
  47. #
  48. **** PROC NVFTETC - XREF LIST.
  49. #
  50.  
  51. $BEGIN
  52. XREF
  53. BEGIN
  54. PROC ABORT; # ABORT NVF JOB #
  55. PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
  56. END
  57. $END
  58.  
  59. XREF
  60. BEGIN
  61. PROC NVFUFVO; # FREE VCB ORDINAL #
  62. PROC NVFTIAM; # ISSUE ACCOUNT DAYFILE MESSAGE #
  63. PROC NVFTURL; # UPDATE THE RESTRICT LOGIN TABLE #
  64. PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
  65. PROC SSTRTS; # REMOVE TABLE SPACE #
  66. END
  67.  
  68. #
  69. ****
  70. #
  71.  
  72.  
  73. ITEM LNGTH I; # LENGTH OF MESSAGE #
  74. ITEM NAME C(7); # NAME TO SEARCH *PDCT* FOR #
  75. ITEM ORD I; # *PDCT* ORDINAL TO REMOVE SPACE AT #
  76. ITEM PC I; # *PDCT* ENTRY (CONSOLE) ORDINAL #
  77. ITEM PD I; # *PDCT* PASSIVE DEVICE ORDINAL #
  78. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  79. ITEM WC I; # NUMBER OF WORDS TO DELETE FROM *PDCT* #
  80.  
  81. $BEGIN
  82. #
  83. * FOLLOWING ARRAY CONTAINS MESSAGE ISSUED TO THE DAYFILE UPON NOT
  84. * FINDING AN EXPECTED PDCT ENTRY.
  85. #
  86. ARRAY DAYMSG[00:00] S(5);
  87. BEGIN
  88. ITEM DAY$MSG1 C(00,00,27) = ["NVFTETC - CANNOT FIND PDCT "];
  89. ITEM DAY$MSG2 C(02,42,17) = ["ENTRY FOR TERMNAM"];
  90. ITEM DAY$TNAME C(03,42,07); # TERMINAL NAME #
  91. END
  92. $END
  93.  
  94. #
  95. * SECURITY COUNT FLAG NOT SET AND USER INDEX NON-ZERO INDICATES A
  96. * VALID USER AND THAT FAMILY COUNT HAS BEEN INCREMENTED.
  97. * THEREFORE, FAMILY COUNT MUST BE DECREMENTED PRIOR TO TERMINATION.
  98. #
  99. IF (PTA$DT[PT] EQ DT$CONS)
  100. OR (PTA$DT[PT] EQ DT$CLP)
  101. OR (PTA$DT[PT] EQ DT$USER)
  102. THEN # INTERACTIVE DEVICES #
  103. BEGIN
  104. IF (PTA$UIDX[PT] NQ 0)
  105. AND (NOT PTA$SCEF[PT])
  106. THEN # VALID USER #
  107. BEGIN
  108. P<CRQBUF> = LOC(MSGBUF[0]) + ((NMSGBUF$ + 1) / 2);
  109. CRQ$FCWORD[0] = 0; # CLEAR CPM REQUEST BUFFER #
  110. CRQ$FWORD[0] = 0;
  111.  
  112. CRQ$FC[0] = CPM73B$; # DECREMENT FAMILY COUNT #
  113. CRQ$ACN[0] = 0;
  114. CRQ$FNAM[0] = PTA$FNAM[PT];
  115.  
  116. LNGTH = CRQDSIZ$ * 10;
  117. NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,LNGTH); # REQ TO QUEUE #
  118. IF (NOT PTA$CACA[PT]) AND (NOT PTA$INVPID[PT]) # MULT CONCNT #
  119. AND (PTA$PROMPT[PT] NQ AWTPID$) # LOGINS PROHIB AND VALID#
  120. THEN # USER AND NOT WAITING FOR PID #
  121. NVFTURL(PT); # REMOVE THE *RML* ENTRY #
  122. #
  123. * DETERMINE IF *AEUN* ACCOUNT DAYFILE MESSAGE MUST BE ISSUED.
  124. * MESSAGE IS ISSUED ONLY IF THE *ABUN* (SUCCESSFUL USER LOGIN)
  125. * ACCOUNT DAYFILE MESSAGE HAS BEEN ISSUED.
  126. #
  127. IF (PTA$PROMPT[PT] EQ AWTAPP$)
  128. OR (NOT PTA$IUVF[PT])
  129. THEN # MUST ISSUE *AEUN* ACOUNT MSG #
  130. BEGIN
  131. NVFTIAM(PT,AEUN$); # ISSUE *AEUN* ACCOUNT MESSAGE #
  132. END
  133. END
  134. END
  135. #
  136. * BUILD CR/TRM SM ONLY IF ACN IS NON-ZERO (NVF'S CONNECTIONS).
  137. #
  138. IF PTA$ACN[PT] NQ 0
  139. THEN # MUST SEND CR/TRM SM #
  140. BEGIN
  141. SPMSG0[1] = 0; # CLEAR RESPONSE AREA #
  142.  
  143. PFCSFC[1] = CRTRM;
  144. CRRTRM[1] = PTA$RC[PT];
  145. CRACN[1] = PTA$ACN[PT];
  146.  
  147. NVFUMQE(P<CTQ>,APSM[1],APPPR$,0,LCRTRM); # TRANSFER SM TO Q #
  148. END
  149. #
  150. * FOR SYNCHRONOUS DEVICES, DELETE ITS ENTRY FROM THE *PDCT* TABLE.
  151. * FOR CONSOLES THIS MEANS DELETE THE ENTIRE ENTRY. FOR PASSIVE
  152. * DEVICES THIS MEANS DELETE THE SINGLE WORD FOR THE PASSIVE DEVICE.
  153. #
  154. IF PTA$TC[PT] GQ TC9$ # SYNCHRONOUS DEVICE #
  155. THEN
  156. BEGIN
  157. IF PTA$DT[PT] NQ DT$CONS
  158. AND PTA$DT[PT] NQ DT$USER
  159. THEN # PASSIVE DEVICE #
  160. NAME = PTA$OCN[PT]; # WILL SEARCH FOR OWNING CONSOLE#
  161. ELSE # CONSOLE #
  162. NAME = PTA$TN[PT];
  163.  
  164. PDT$CN[PDTLNGTH] = NAME; # INSURE LOOP TERMINATION #
  165. FOR PC=0 STEP PDT$WC[PC]
  166. WHILE PDT$CN[PC] NQ NAME
  167. DO # FIND CORRECT *PDCT* ENTRY #
  168. BEGIN END
  169. ORD = PC;
  170. WC = PDT$WC[PC];
  171.  
  172. PD = 0;
  173. IF PC LS PDTLNGTH
  174. AND PTA$DT[PT] NQ DT$CONS
  175. AND PTA$DT[PT] NQ DT$USER
  176. THEN # MUST SEARCH FOR PASS DEV WORD #
  177. BEGIN
  178. FOR PD = PC+PDCTSIZ$ STEP 1
  179. WHILE PDT$PN[PD] NQ PTA$TN[PT]
  180. AND PD LS PC+WC
  181. DO # FIND PASS DEV WD IN PDCT NTRY #
  182. BEGIN END
  183. ORD = PD;
  184. WC = 1;
  185. END
  186.  
  187. $BEGIN
  188. IF PC GQ PDTLNGTH
  189. AND (PTA$DT[PT] EQ DT$CONS OR PTA$DT[PT] EQ DT$USER)
  190. THEN # NO *PDCT* ENTRY FOR CONSOLE #
  191. BEGIN
  192. DAY$TNAME[0] = PTA$TN[PT];
  193. MESSAGE (DAYMSG, 0);
  194. ABORT;
  195. END
  196. $END
  197.  
  198. IF PC LS PDTLNGTH
  199. AND PD LS PC+PDT$WC[PC]
  200. THEN # MUST DELETE SPACE IN *PDCT* #
  201. BEGIN
  202. SSTRTS (P<PDCT>, ORD, WC);
  203. IF WC EQ 1
  204. THEN
  205. PDT$WC[PC] = PDT$WC[PC] - 1;
  206. END
  207.  
  208. END # SYNCHRONOUS DEVICE LOGIC #
  209.  
  210.  
  211. #
  212. * RETURN THE VCB ORDINAL AND DELETE *PTAC* ENTRY.
  213. #
  214. NVFUFVO(PTA$VCB[PT]); # FREE UP THE VCB ORDINAL #
  215.  
  216. PT = PT * PTACSIZ$;
  217. SSTRTS(P<PTAC>,PT,PTACSIZ$); # DELETE PTAC ENTRY #
  218.  
  219. END # END NVFTETC #
  220.  
  221. TERM
1)
PT
cdc/nos2.source/nam5871/nvftetc.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator