User Tools

Site Tools


cdc:nos2.source:nam5871:nvftcrn

NVFTCRN

Table Of Contents

  • [00008] PROC NVFTCRN((PT),RNAME)
  • [00009] NVFTCRN - CHECK FOR RESERVED APPLICATION NAME
  • [00013] CHECK FOR RESERVED APPLICATION NAME.
  • [00059] PROC NVFTETC
  • [00060] PROC NVFTIAM
  • [00061] PROC NVFTURL
  • [00062] PROC NVFUMQE

Source Code

NVFTCRN.txt
  1. *DECK NVFTCRN
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7.  
  8. PROC NVFTCRN((PT),RNAME);
  9. # TITLE NVFTCRN - CHECK FOR RESERVED APPLICATION NAME #
  10.  
  11. BEGIN # NVFTCRN #
  12. #
  13. ** NVFTCRN - CHECK FOR RESERVED APPLICATION NAME.
  14. *
  15. * E. THAVIKULWAT 81/10/29
  16. *
  17. * THIS PROCEDURE CHECKS FOR VOLUNTEERED RESERVED APPLICATION NAMES
  18. * OF "HELLO", "LOGIN", "BYE", OR "LOGOUT". IT IS CALLED INTO
  19. * EXECUTION BY THE FOLLOWING PROCEDURES:
  20. * *NVFTRVD* *NVFTVAA*
  21. *
  22. * PROC NVFTCRN((PT),RNAME)
  23. *
  24. * ENTRY:
  25. * PT = POINTER TO PTAC ENTRY.
  26. *
  27. * EXIT:
  28. * RNAME = NORESNAM$ IF NOT A RESERVED APPLICATION NAME.
  29. * = LOGIN$ IF NAME IS "LOGIN" OR "HELLO".
  30. * = LOGOUT$ IF NAME IS "LOGOUT" OR "BYE".
  31. *
  32. * NOTES:
  33. * IN THE CASE WHERE THERE IS A MANDATORY OR PRIMARY APPLICATION
  34. * SPECIFIED IN THE *LCF*, OR A IMPLIED MANDATORY APPLICATION
  35. * SPECIFIED IN THE *VALIDUS* FILE, AND A VOLUNTEERED RESERVED
  36. * APPLICATION NAME IS ENTERED, THE VOLUNTEERED RESERVED
  37. * APPLICATION NAME OVERRIDES THE *LCF* OR *VALIDUS* NAME.
  38. *
  39. * METHOD:
  40. * IF VOLUNTEERED APPLICATION NAME IS "HELLO" OR "LOGIN", ISSUE
  41. * *AEUN* ACCOUNT MESSAGE, DECREMENT FAMILY COUNT,
  42. * SEND OUT BANNER AND SYSTEM HEADER, AND SET STATE OF
  43. * TERMINAL TO AWAIT PROMPT. ALSO, IF MULTIPLE LOGINS ARE
  44. * PROHIBITED, REMOVE THE ENTRY FROM THE *RML* TABLE. IF THE
  45. * VOLUNTEERED APPLICATION NAME IS EITHER "BYE" OR "LOGOUT",
  46. * SEND THE LOGOUT MESSAGE AND CALL *NVFTETC* TO END THE TERMINAL
  47. * CONNECTION.
  48. * IF THE VOLUNTEERED APPLICATION NAME IS ANY OF THE ABOVE MENTIONED
  49. * RESERVED WORDS, SEND OUT A CTR/CHAR TO FORCE THE TERMINAL TO BE
  50. * IN NON-TRANSPARENT MODE.
  51. #
  52.  
  53. #
  54. **** PROC NVFTCRN - XREF LIST.
  55. #
  56.  
  57. XREF
  58. BEGIN
  59. PROC NVFTETC; # END TERMINAL CONNECTION #
  60. PROC NVFTIAM; # ISSUE ACCOUNTING MESSAGE #
  61. PROC NVFTURL; # UPDATE THE RESTRICT LOGIN TABLE #
  62. PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
  63. END
  64.  
  65. #
  66. ****
  67. #
  68. DEF RCULO$ #22#; # USER LOGOUT REASON CODE #
  69.  
  70. *CALL TMSGNVF
  71.  
  72. *CALL TERMCLS
  73.  
  74.  
  75. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  76. ITEM I I; # LOOP VARIABLE #
  77. ITEM LNGTH I; # LENGTH OF MESSAGE #
  78. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  79. ITEM RNAME I; # RESERVED APPLICATION NAME INDICATOR #
  80.  
  81. #
  82. * FOLLOWING ARRAY DEFINES THE RESERVED APPLICATION NAMES.
  83. #
  84. ARRAY RSVAPPL[00:03] S(1);
  85. BEGIN
  86. ITEM RAP$NAME C(00,00,07) = ["HELLO","LOGIN","BYE","LOGOUT"];
  87. END
  88. #
  89. * THE FOLLOWING BASED ARRAY IS FOR GENERAL PURPOSE USAGE
  90. #
  91. BASED ARRAY BPGEN[00:00] S(1);
  92. BEGIN
  93. ITEM BPG$WORD U(00,00,60); # FULL WORD REFERENCE #
  94. END
  95.  
  96. RNAME = NORESNAM$;
  97. #
  98. * SEARCH RESERVED APPLICATION NAME TABLE FOR MATCH.
  99. #
  100. FOR I = 0 STEP 1 WHILE
  101. (RNAME EQ NORESNAM$) AND (I LS 4)
  102. DO
  103. BEGIN
  104. IF (RAP$NAME[I] EQ PTA$VLTAPP[PT])
  105. THEN # RESERVED APPLICATION NAME #
  106. BEGIN
  107. RNAME = LOGIN$; # INITIALIZE TO "LOGIN" FOUND #
  108. #
  109. * IF A RESERVED APPLICATION NAME WAS SPECIFIED ON AN INITIAL
  110. * LOAN, RETURN. A CR/RCN/A WILL BE SENT LATER.
  111. #
  112. IF PTA$LRC[PT] EQ RCRC"LSA"
  113. THEN
  114. BEGIN
  115. RETURN;
  116. END
  117.  
  118. ADDR = PTA$ACN[PT];
  119. #
  120. * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR.
  121. #
  122. GOTO TERMCLS [PTA$TC[PT]];
  123.  
  124. SENDCTRCHAR:
  125.  
  126. #
  127. * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT INPUT
  128. * MODE.
  129. #
  130. PFCSFC[1] = CTRCHAR;
  131. CTRSTR[1] = 0; # CLEAR REST OF WORD 0 #
  132. B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT#
  133. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO Q #
  134.  
  135. NOCTRCHAR:
  136.  
  137. IF (I LS 2)
  138. THEN # NAME IS "HELLO" OR "LOGIN" #
  139. BEGIN
  140. #
  141. * ISSUE *AEUN* ACCOUNT MESSAGE, POINT BASE ARRAY TO OUTPUT
  142. * HALF OF *MSGBUF*, AND SET UP DECREMENT FAMILY COUNT
  143. * REQUEST.
  144. #
  145. NVFTIAM(PT,AEUN$); # ISSUE *AEUN* ACCOUNTING MSG #
  146.  
  147. P<CRQBUF> = LOC(MSGBUF[0]) + ((NMSGBUF$ + 1) / 2);
  148. CRQ$FCWORD[0] = 0; # CLEAR CPM REQUEST BUFFER #
  149. CRQ$FWORD[0] = 0;
  150. CRQ$FC[0] = CPM73B$; # DECREMENT FAMILY COUNT #
  151. CRQ$ACN[0] = 0;
  152. CRQ$FNAM[0] = PTA$FNAM[PT]; # FAMILY NAME #
  153.  
  154. LNGTH = CRQDSIZ$ * 10; # LENGTH OF REQUEST #
  155. NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,LNGTH); # REQ TO Q #
  156. IF NOT PTA$CACA[PT]
  157. THEN # MULT CONCURRENT LOGINS PROHIB #
  158. NVFTURL(PT); # REMOVE ENTRY FROM *RML* TABLE #
  159. #
  160. * CLEAR APPROPRIATE FIELDS OF PTAC ENTRY TO REFLECT LOGIN
  161. * STATE.
  162. #
  163. P<BPGEN> = LOC(PTA$FWORD[PT]); # 1ST WRD OF VALIDATN DATA #
  164. FOR I = 0 STEP 1 UNTIL 9
  165. DO
  166. BEGIN
  167. BPG$WORD[I] = 0; # CLEAR VALIDATION DATA FIELDS #
  168. END
  169.  
  170. P<BPGEN> = LOC(PTA$VDSAPP[PT]); # 1ST WRD AFTER AUTO DATA #
  171. FOR I = 0 STEP 1 UNTIL 4
  172. DO
  173. BEGIN
  174. BPG$WORD[I] = 0; # CLEAR FIELDS AFTER AUTO DATA #
  175. END
  176.  
  177. P<BPGEN> = LOC(PTA$PID[PT]);
  178. BPG$WORD[0] = 0; # CLEAR THE PERSONAL ID FIELD #
  179. BPG$WORD[1] = 0;
  180. #
  181. * SEND OUT BANNER AND SET STATE OF TERMINAL TO AWAIT PROMPT.
  182. #
  183. NVFUMQE(P<CTQ>,CPRBUF,APPTTX$,ADDR,LMSG90$);
  184. BAN$DATE[0] = CTM$DATE[0];
  185. BAN$TIME[0] = CTM$CLOCK[0];
  186. BAN$TNAM[0] = PTA$TN[PT];
  187. NVFUMQE(P<CTQ>,BANBUF,APPTTX$,ADDR,LMSG30$);
  188. NVFUMQE(P<CTQ>,SYSHDR,APPTTX$,ADDR,LMSG70$);
  189.  
  190. PTA$PROMPT[PT] = AWTFAM$; # SET TO AWAIT FAMILY #
  191. PTA$STATE[PT] = PTACST"AWTPRMT"; # SET TO AWAIT PROMPT #
  192. PTA$IUVF[PT] = TRUE; # SET TO INITIAL VALIDATION #
  193. END
  194. ELSE # NAME IS "BYE" OR "LOGOUT" #
  195. BEGIN
  196. #
  197. * APPLICATION NAME IS "BYE" OR "LOGOUT", SEND LOGGED OUT
  198. * MESSAGE AND END TERMINAL CONNECTION.
  199. #
  200. RNAME = LOGOUT$; # "BYE" OR "LOGOUT" FOUND #
  201. PTA$RC[PT] = RCULO$; # USER LOGOUT RC FOR CR/TRM SM #
  202. NVFUMQE(P<CTQ>,LOMBUF,APPTTX$,ADDR,LMSG20$); # TEXT TO Q #
  203. NVFTETC(PT); # END TERMINAL CONNECTION #
  204. END
  205. END
  206. END
  207.  
  208. END # END NVFTCRN #
  209.  
  210. TERM
cdc/nos2.source/nam5871/nvftcrn.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator