User Tools

Site Tools


cdc:nos2.source:nam5871:nvftvaa

NVFTVAA

Table Of Contents

  • [00005] PROC NVFTVAA1)
  • [00006] NVFTVAA - VALIDATE USER'S RIGHT TO ACCESS APPL
  • [00010] VALIDATE USER'S RIGHT TO ACCESS APPLICATION.
  • [00060] PROC NVFTCRN
  • [00061] PROC NVFTILP
  • [00062] PROC NVFTPSV
  • [00063] PROC NVFTPUV
  • [00064] PROC NVFUMQE
  • [00065] PROC NVFTRLC
  • [00071] PROC MESSAGE
  • [00212] PROC DAPNAME
  • [00213] DAPNAME - DETERMINE SWITCH APPLICATION NAME
  • [00217] DAPNAME - DETERMINE SWITCH APPLICATION NAME.

Source Code

NVFTVAA.txt
  1. *DECK NVFTVAA
  2. USETEXT TEXTNVF
  3. USETEXT TXTANVF
  4. USETEXT TXSMNVF
  5. PROC NVFTVAA((PT));
  6. # TITLE NVFTVAA - VALIDATE USER'S RIGHT TO ACCESS APPL #
  7.  
  8. BEGIN # NVFTVAA #
  9. #
  10. ** NVFTVAA - VALIDATE USER'S RIGHT TO ACCESS APPLICATION.
  11. *
  12. * E. THAVIKULWAT 81/10/28
  13. * C. BRION 83/05/10
  14. *
  15. * THIS PROCEDURE'S MAIN FUNCTION IS TO DETERMINE IF APPLICATION
  16. * NAME IS VALID (EXIST IN *AST* TABLE), AND IF SO, IS USER VALIDATED
  17. * TO ACCESS THE APPLICATION. IT IS CALLED INTO EXECUTION BY THE
  18. * FOLLOWING PROCEDURES:
  19. * *NVFTETI* *NVFTVVD*
  20. *
  21. * PROC NVFTVAA((PT))
  22. *
  23. * ENTRY:
  24. * PT = POINTER TO PTAC ENTRY
  25. *
  26. * EXIT:
  27. * APPROPRIATE MESSAGE ISSUED IF ANY ERRORS. OTHERWISE, PTAC ENTRY
  28. * UPDATED WITH THE APPLICATION NAME TO SWITCH TO.
  29. *
  30. * NOTES:
  31. * 1) USER VOLUNTEERED APPLICATION NAME OF "HELLO", "LOGIN", "BYE",
  32. * OR "LOGOUT" OVERRIDES ANY MANDATORY/IMPLIED MANDATORY/PRIMARY
  33. * APPLICATION NAME.
  34. * 2) IF THE MANDATORY/PRIMARY APPLICATION NAME FROM THE *LCF* IS
  35. * USED AND IF THE NAME IS ONE OF THE RESERVED APPLICATION NAME
  36. * OF "HELLO", "LOGIN", "BYE", OR "LOGOUT", THEN THE NAME WILL
  37. * NOT BE IN THE *AST* TABLE AND WILL RESULT IN ILLEGAL
  38. * APPLICATION.
  39. *
  40. * METHOD:
  41. * IF USER VOLUNTEERED APPLICATION NAME EXIST, CALL PROCEDURE
  42. * *NVFTCRN* TO DETERMINE IF IT IS ONE OF THE RESERVED APPLICATION
  43. * NAME OF "HELLO", "LOGIN", "BYE", OR "LOGOUT". IF IT IS, JUST
  44. * EXIT AS *NVFTCRN* WOULD HAVE TAKEN APPROPRIATE ACTION DEPENDING
  45. * ON THE RESERVED NAME. IF IT IS NOT, CALL INTERNAL PROCEDURE
  46. * *DAPNAME* TO DETERMINE THE SWITCH APPLICATION NAME. SEARCH
  47. * *AST* TABLE FOR A MATCH ON THE APPLICATION NAME. IF MATCH AND
  48. * THE ACCESS WORD BIT POSITION OF THE USER'S ACCESS WORD IS SET,
  49. * THEN USER IS VALIDATED TO ACCESS THE REQUESTED APPLICATION.
  50. * OTHERWISE, USER IS NOT VALIDATED TO ACCESS THE REQUESTED
  51. * APPLICATION.
  52. #
  53.  
  54. #
  55. **** PROC NVFTVAA - XREF LIST.
  56. #
  57.  
  58. XREF
  59. BEGIN
  60. PROC NVFTCRN; # CHECK FOR RESERVED APPLICATION NAME #
  61. PROC NVFTILP; # ISSUE LOGIN PROMPT #
  62. PROC NVFTPSV; # PROCESS SUCCESSFUL VALIDATION #
  63. PROC NVFTPUV; # PROCESS UNSUCCESSFUL VALIDATION #
  64. PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
  65. PROC NVFTRLC; # REFUSE LOANED CONNECTION #
  66. END
  67.  
  68. $BEGIN
  69. XREF
  70. BEGIN
  71. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  72. END
  73. $END
  74.  
  75. #
  76. ****
  77. #
  78.  
  79. *CALL TMSGNVF
  80.  
  81.  
  82.  
  83. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  84. ITEM BPOS I; # BIT POSITION (SYMPL NOTATION) #
  85. ITEM ERRFLAG B; # ERROR INDICATOR FLAG #
  86. ITEM I I; # LOOP VARIABLE #
  87. ITEM MATCH B; # EXIT LOOP VARIABLE #
  88. ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
  89. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  90. ITEM RNAME I; # RESERVED NAME INDICATOR #
  91. ITEM SMOUT B; # SM TYPE OUT FOR NVFTRLC #
  92. CONTROL EJECT;
  93.  
  94.  
  95. #
  96. * IF USER VOLUNTEERED APPLICATION NAME AND NAME IS NOT INVALID,
  97. * CALL *NVFTCRN* TO DETERMINE IF NAME IS ONE OF THE RESERVED
  98. * APPLICATION NAME.
  99. #
  100. IF (PTA$VAF[PT]) AND (NOT PTA$INVAF[PT])
  101. THEN # VOLUNTEERED AND VALID #
  102. BEGIN
  103. NVFTCRN(PT,RNAME);
  104. IF (RNAME NQ NORESNAM$)
  105. THEN
  106. BEGIN
  107. IF RNAME EQ LOGIN$
  108. THEN
  109. BEGIN
  110. #
  111. * RESERVED APPLICATION NAME OF "HELLO" OR "LOGIN".
  112. * IF NOT LOAN REQUEST TYPE, ISSUE PROMPT.
  113. #
  114. IF PTA$LRC[PT] LS RCRC"LSA"
  115. THEN
  116. BEGIN
  117. NVFTILP(PT);
  118. END
  119. IF PTA$LRC[PT] GQ RCRC"LSA"
  120. THEN
  121. BEGIN
  122. #
  123. * RESERVED APPLICATION NAME AND LOAN REQUEST CONNECTION.
  124. * NOT ALLOWED, RETURN CONNECTION TO PRIMARY.
  125. #
  126. IF PTA$LRC[PT] EQ RCRC"LSA"
  127. THEN
  128. SMOUT = TRUE;
  129. ELSE
  130. SMOUT = FALSE;
  131. PTA$LRC[PT] = RCRC"SNA";
  132. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  133. END
  134. END
  135. #
  136. * IF ANY RESERVED NAME WAS FOUND, JUST RETURN. IF THE RESERVED
  137. * NAME WAS "BYE" OR "LOGOUT", NVF WILL HAVE ALREADY TERMINATED
  138. * THE CONNECTION.
  139. #
  140. RETURN;
  141. END
  142. END
  143. #
  144. * CALL INTERNAL PROCEDURE *DAPNAME* TO DETERMINE SWITCH APPLICATION
  145. * NAME.
  146. #
  147. DAPNAME;
  148. #
  149. * *DAPNAME* WILL RETURN AN ERROR IF BOTH MANDATORY AND IMPLIED
  150. * MANDATORY APPLICATION NAME IS SPECIFIED AND THE NAMES ARE NOT
  151. * THE SAME.
  152. #
  153. IF (NOT ERRFLAG) AND (NOT PTA$INVAF[PT])
  154. THEN # NO ERROR #
  155. BEGIN
  156.  
  157. #
  158. * SEARCH *AST* TABLE FOR THE REQUESTED APPLICATION NAME. IF
  159. * MATCH AND USER HAS PERMISSION TO ACCESS APPLICATION, THEN CALL
  160. * *NVFTPSV* TO CONTINUE PROCESSING. OTHERWISE, CALL *NVFTPUV* TO
  161. * ISSUE APPROPRIATE ERROR MESSAGE.
  162. #
  163. ERRFLAG = TRUE;
  164. MATCH = FALSE;
  165. NENTRY = ASTLNGTH / ASTSIZ$;
  166. FOR I = 0 STEP 1 WHILE (NOT MATCH AND I LS NENTRY)
  167. DO
  168. BEGIN
  169. IF (AST$ANAM[I] EQ PTA$SWTAPP[PT])
  170. THEN # FOUND REQUESTED APPLICATION #
  171. BEGIN
  172. IF AST$AWBP[I] NQ NSAWBP$
  173. THEN
  174. BEGIN # APPLICATION NOT "NS" #
  175. BPOS = 59 - AST$AWBP[I]; # BIT POSITION (SYMPL NOTATION) #
  176. IF (B<BPOS,1>PTA$AAVW[PT] EQ 1)
  177. THEN # USER VALIDATED TO ACCESS APPL #
  178. BEGIN
  179. ERRFLAG = FALSE; # INDICATE APPLICATION FOUND #
  180. END
  181. END
  182.  
  183. MATCH = TRUE; # EXIT LOOP #
  184. END
  185. END
  186. END
  187.  
  188. IF NOT MATCH AND (PTA$LRC[PT] EQ RCRC"LSA")
  189. THEN # SECONDARY APPLICATION DOES NOT EXIT #
  190. BEGIN
  191. SMOUT = TRUE;
  192. PTA$LRC[PT] = RCRC"SAI";
  193. NVFTRLC (PT,SMOUT,PTA$LRC[PT]); # SEND CR/RCN/A WITH RC=23B #
  194. RETURN;
  195. END
  196.  
  197. IF (PTA$INVAF[PT]) OR (ERRFLAG)
  198. THEN # INVALID APPL OR USER OF APPL #
  199. BEGIN
  200. NVFTPUV(PT); # UNSUCCESSFUL APPL VALIDATION #
  201. END
  202. ELSE # VALID APPL AND USER #
  203. BEGIN
  204. PTA$PROMPT[PT] = AWTAPP$;
  205. NVFTPSV(PT); # SUCCESSFUL APPL VALIDATION #
  206. END
  207. RETURN;
  208.  
  209.  
  210. CONTROL EJECT;
  211.  
  212. PROC DAPNAME;
  213. # TITLE DAPNAME - DETERMINE SWITCH APPLICATION NAME #
  214.  
  215. BEGIN # DAPNAME #
  216. #
  217. ** DAPNAME - DETERMINE SWITCH APPLICATION NAME.
  218. *
  219. * E. THAVIKULWAT 81/10/28
  220. *
  221. * THIS PROCEDURE IS INTERNAL TO PROCEDURE *NVFTVAA* AND IS CALLED
  222. * ONLY BY *NVFTVAA*. IT'S MAIN FUNCTION IS TO DETERMINE THE
  223. * APPROPRIATE APPLICATION TO SWITCH THE USER TO.
  224. *
  225. * PROC DAPNAME
  226. *
  227. * ENTRY:
  228. * PT = POINTER TO PTAC ENTRY.
  229. *
  230. * EXIT:
  231. * SWITCH APPLICATION NAME ENTERED IN PTAC ENTRY.
  232. *
  233. * NOTES:
  234. * FOR AUTOLOGIN DATA, THE FOLLOWING ORDER OF PRECEDENCE IS USED
  235. * TO DETERMINE SWITCH APPLICATION NAME:
  236. * 1) MANDATORY OR IMPLIED MANDATORY APPLICATION NAME,
  237. * WHICHEVER IS SPECIFIED.
  238. * 2) PRIMARY APPLICATION NAME IF PRIMARY INDICATED AND USER
  239. * VOLUNTEERED VALUE IS "NULL" OR BLANK.
  240. * 3) USER VOLUNTEERED APPLICATION NAME IS USED OTHERWISE.
  241. *
  242. * IF MANDATORY AND IMPLIED MANDATORY APPLICATION NAME ARE BOTH
  243. * SPECIFIED, THE NAMES MUST BE THE SAME. OTHERWISE, AN ERROR IS
  244. * ISSUED AND THE CONNECTION TERMINATED.
  245. *
  246. * METHOD:
  247. * IF MANDATORY OR IMPLIED MANDATORY APPLICATION NAME SPECIFIED
  248. * AND USER STILL VOLUNTEERED AN APPLICATION NAME (CAN ONLY BE
  249. * VIA ABBREVIATED FORMAT), CLEAR APPLICATION INVALID FLAG FIELD
  250. * IN PTAC ENTRY AS THE VOLUNTEERED NAME WILL NOT BE USED AND
  251. * ISSUE MESSAGE THAT VOLUNTEERED NAME IS IGNORED. SET SWITCH
  252. * APPLICATION NAME TO MANDATORY OR IMPLIED MANDATORY, WHICHEVER
  253. * ONE IS SPECIFIED. IF DEFAULT (ACTUALLY PRIMARY BUT IS CHANGED
  254. * TO DEFAULT BY *NVFTILP* SO THAT SUBSEQUENT LOGIN WILL SOLICIT
  255. * APPLICATION PROMPT) SPECIFIED INSTEAD AND VOLUNTEERED
  256. * APPLICATION NAME IS "NULL" OR BLANK, SET SWITCH APPLICATION NAME
  257. * TO THE DEFAULT(PRIMARY) VALUE. OTHERWISE, SET SWITCH APPLICATION
  258. * NAME TO THE USER VOLUNTEERED APPLICATION NAME.
  259. #
  260.  
  261. ERRFLAG = FALSE;
  262. IF (PTA$APPIND[PT] EQ MNDATRY$) OR (PTA$VDSF[PT])
  263. THEN # MANDATORY AND/OR IMPLIED MANDATORY #
  264. BEGIN
  265. PTA$SWTAPP[PT] = PTA$ALIAPP[PT]; # PRESET TO MANDATORY #
  266. IF (PTA$VAF[PT])
  267. THEN # HAVE USER VOLUNTEERED APPL #
  268. BEGIN # SEND APPLICATION IGNORED MSG #
  269. PTA$INVAF[PT] = FALSE; # CLEAR INVALID APPL FLAG #
  270. UPA$TYPE[0] = "APPLICATION";
  271. ADDR = PTA$ACN[PT];
  272. NVFUMQE(P<CTQ>,UPABUF[0],APPTTX$,ADDR,LMSG40$);
  273. END
  274. #
  275. * IF MANDATORY AND IMPLIED MANDATORY ARE BOTH SPECIFIED, THE
  276. * NAMES MUST BE THE SAME.
  277. #
  278. IF (PTA$APPIND[PT] EQ MNDATRY$) AND (PTA$VDSF[PT])
  279. THEN # MANDATRY AND IMPLIED MANDATRY #
  280. BEGIN
  281. IF (PTA$ALIAPP[PT] NQ PTA$VDSAPP[PT])
  282. THEN # NAMES NOT THE SAME #
  283. BEGIN
  284. ERRFLAG = TRUE;
  285. END
  286. END
  287. ELSE # MANDATORY OR IMPLIED MANDATRY #
  288. BEGIN
  289. IF (PTA$VDSF[PT])
  290. THEN # IMPLIED MANDATORY #
  291. BEGIN
  292. PTA$SWTAPP[PT] = PTA$VDSAPP[PT]; # SET TO IMPLIED MNDATRY #
  293. END
  294. END
  295. END
  296. ELSE # NON-MANDATORY #
  297. BEGIN
  298. PTA$SWTAPP[PT] = PTA$VLTAPP[PT]; # PRESET TO VOLUNTEERED APPL #
  299. #
  300. * IF VOLUNTEERED APPLICATION NAME IS "NULL" OR BLANK, AND DEFAULT
  301. * (ACTUALLY PRIMARY) SPECIFIED, USE THE DEFAULT NAME. OTHERWISE,
  302. * USE THE VOLUNTEERED NAME.
  303. #
  304. IF (PTA$APPIND[PT] EQ DEFAULT$)
  305. AND ((PTA$VLTAPP[PT] EQ NULL$) OR (PTA$VLTAPP[PT] EQ " "))
  306. THEN # DEFAULT AND NULL (OR BLANK) #
  307. BEGIN
  308. PTA$SWTAPP[PT] = PTA$ALIAPP[PT]; # USE DEFAULT NAME #
  309. END
  310. END
  311.  
  312. END # END DAPNAME #
  313.  
  314. END # END NVFTVAA #
  315.  
  316. TERM
1)
PT
cdc/nos2.source/nam5871/nvftvaa.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator