User Tools

Site Tools


cdc:nos2.source:nam5871:nvftrcn

NVFTRCN

Table Of Contents

  • [00008] PROC NVFTRCN
  • [00009] NVFTRCN - RECONNECT TO NVF REQUEST (CR/RCN SM)
  • [00013] RECONNECT TO NVF REQUEST (CR/RCN SM).
  • [00071] PROC MOVE
  • [00072] PROC NVFSCAD
  • [00073] PROC NVFTDAD
  • [00074] PROC NVFTILP
  • [00075] PROC NVFTPVD
  • [00076] PROC NVFTRLC
  • [00077] PROC NVFTURT
  • [00078] PROC NVFUMQE
  • [00079] PROC SSTETS
  • [00080] FUNC XSFW C(10)

Source Code

NVFTRCN.txt
  1. *DECK NVFTRCN
  2. USETEXT TEXTNVF
  3. USETEXT TXSMNVF
  4. USETEXT TXTANVF
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7.  
  8. PROC NVFTRCN;
  9. # TITLE NVFTRCN - RECONNECT TO NVF REQUEST (CR/RCN SM) #
  10.  
  11. BEGIN # NVFTRCN #
  12. #
  13. ** NVFTRCN - RECONNECT TO NVF REQUEST (CR/RCN SM).
  14. *
  15. * E. THAVIKULWAT 81/11/09
  16. * A. LIM 82/08/04
  17. * C. BRION 83/04/11. 83/05/10.
  18. *
  19. * THIS PROCEDURE'S MAIN FUNCTION IS TO RECONNECT TERMINAL TO NVF IN
  20. * RESPONSE TO A CR/RCN REQUEST. IT IS CALLED INTO EXECUTION BY
  21. * PROCEDURE *NVFTDQE*.
  22. *
  23. * PROC NVFTRCN
  24. *
  25. * ENTRY:
  26. * CR/RCN SM IN *MSGBUF*
  27. *
  28. * EXIT:
  29. * ONE OF THE FOLLOWING:
  30. * 1) CONNECTION TERMINATED.
  31. * 2) APPLICATION PROMPT REISSUED.
  32. * 3) CONNECTION SWITCHED TO ANOTHER APPLICATION.
  33. *
  34. * NOTES:
  35. * A CR/RCN REQUEST IS SENT TO NVF FOR 2 REASONS:
  36. * 1) THE SWITCH REQUEST WAS SUCCESSUFL BUT EITHER SOMETHING IS
  37. * WRONG WITH THE APPLICATION OR USER REQUESTED A RECONNECT.
  38. * IN THIS CASE, A *PTAC* ENTRY FOR THE CONNECTION NO LONGER
  39. * EXIST, BUT A VCB ENTRY FOR THE CONNECTION DOES EXIST OUT
  40. * ON THE VCB FILE. A *PTAC* ENTRY HAS TO BE CREATED AND
  41. * INFORMATION FROM THE CR/RCN SM SAVED.
  42. * 2) THE SWITCH REQUEST WAS NOT SUCCESSFUL. IN THIS CASE, A
  43. * *PTAC* ENTRY FOR THE CONNECTION STILL EXIST. IF DEVICE IS
  44. * AN INTERACTIVE DEVICE, APPROPRIATE MESSAGE IS ISSUED TO
  45. * THE TERMINAL AND APPLICATION PROMPT MAY BE REISSUED. IF
  46. * DEVICE IS A BATCH DEVICE, THE DEVICE REMAIN CONNECTED TO
  47. * NVF UNTIL IT'S OWNING CONSOLE HAS COME BACK AND HAS MADE
  48. * ANOTHER SUCCESSFUL APPLICATION SELECTION OR UNTIL THE NPU
  49. * TERMINATES THE CONNECTION.
  50. *
  51. * REASON CODE FROM CR/RCN REQUEST DETERMINES REASON FOR THE
  52. * RECONNECT. REASON CODE 1-4 IMPLIES 1 ABOVE AND REASON CODE
  53. * OF 5-7 IMPLIES 2 ABOVE.
  54. * A BIAS OF 15 IS ADDED TO THE REASON CODE FROM CR/RCN WHEN THE
  55. * CODE IS TO BE STORED IN THE CR/TRM.
  56. *
  57. * METHOD:
  58. * SEND CR/RCN/N RESPONSE. DETERMINE REASON FOR RECONNECT. IF FOR
  59. * AN UNSUCCESSFUL SWITCH, GET *PTAC* ENTRY, UPDATE WITH NEW ACN,
  60. * AND DECREMENT T-A CONNECTION COUNT. IF FOR A SUCCESSFUL SWITCH,
  61. * CREATE A NEW *PTAC*, UPDATE WITH INFORMATION FROM THE CR/RCN
  62. * REQUEST, AND ISSUE VCB READ REQUEST.
  63. #
  64.  
  65. #
  66. **** PROC NVFTRCN - XREF LIST.
  67. #
  68.  
  69. XREF
  70. BEGIN
  71. PROC MOVE; # MACREL - MOVE CM WORDS #
  72. PROC NVFSCAD; # COMPLETE APPLICATION DEPARTURE #
  73. PROC NVFTDAD; # DETERMINE ADDITIONAL DIALOGUE #
  74. PROC NVFTILP; # ISSUE LOGIN PROMPT #
  75. PROC NVFTPVD; # PREPARE TO RECEIVE VALIDATION DATA #
  76. PROC NVFTRLC; # RECONNECT TO PRIMARY APPLICATION #
  77. PROC NVFTURT; # UPDATE *RAU* TABLE #
  78. PROC NVFUMQE; # TRANSFER SM OR TEXT TO QUEUE #
  79. PROC SSTETS; # SS - ENLARGE TABLE SPACE #
  80. FUNC XSFW C(10); # SPACE FILL WORD #
  81. END
  82.  
  83. #
  84. ****
  85. #
  86.  
  87.  
  88. #
  89. * TEMPORARY BASED ARRAYS FOR USE WHEN CALLING THE *MOVE* ROUTINE.
  90. #
  91. BASED ARRAY TEMPFROM [00:00] S(1);
  92. BEGIN
  93. ITEM FROMWRD U(00,00,60);
  94. END
  95.  
  96. BASED ARRAY TEMPTO [00:00] S(1);
  97. BEGIN
  98. ITEM TOWRD U(00,00,60);
  99. END
  100.  
  101.  
  102. DEF RCNRC$ #15#; # NUMBER TO ADD TO CR/RCN REASON CODE #
  103.  
  104. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  105. ITEM AS I; # SUBSCRIPT FOR ARRAY AST #
  106. ITEM ASENTRY I; # NUMBER AST ENTRIES #
  107. ITEM ERRCOD I; # ERROR CODE #
  108. ITEM I I; # LOOP VARIABLE #
  109. ITEM MATCH B; # MATCH FOUND FLAG #
  110. ITEM OPTWRDSZ I; # SIZE OF OPTIONAL DATA IN CM WORDS #
  111. ITEM PD I; # SUBSCRIPT FOR ARRAY PDCT #
  112. ITEM PORD I; # PRIMARY AST ORDINAL #
  113. ITEM PRIAPP B; # PRIMARY APPL INDICATOR #
  114. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  115. ITEM SAVETLC I; # TEMP PLACE TO STORE THE ABHTLC #
  116. ITEM SMOUT B; # SM TYPE FOR CALL TO NVFTRLC #
  117. ITEM SPSIZ I; # SIZE OF SPTAC ENTRY IN CM WORDS #
  118.  
  119.  
  120.  
  121. #
  122. * DETERMINE NUMBER OF AST ENTRIES.
  123. #
  124. ASENTRY = ASTLNGTH/ASTSIZ$;
  125.  
  126. #
  127. * BUILD CR/RCN/N RESPONSE.
  128. #
  129. SPMSG0[1] = 0; # CLEAR RESPONSE AREA #
  130.  
  131. PFCSFC[1] = CRRCNN;
  132. CRACN[1] = CRACN[0];
  133. CRNXP[1] = TRUE;
  134. CRICT[1] = ICT$;
  135. CRALN[1] = ALN$;
  136.  
  137. ADDR = ABHADR[0];
  138. SAVETLC = ABHTLC[0]; # SAVE TLC FOR LATER USE #
  139. #
  140. * ONLY IF NOT A RECONNECT TO LOAN CONNECTION TO SECONDARY DO
  141. * WE NEED TO RESPOND IMMEDIATELY WITH A NORMAL RESPONSE.
  142. #
  143.  
  144. IF CRRRCN[0] NQ RCRC"LSA"
  145. THEN
  146. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRRCNN);
  147. #
  148. * DETERMINE IF CR/RCN IS FOR AN ABNORMAL RECONNECT (UNSUCCESSFUL
  149. * SWITCH) OR FOR A NORMAL RECONNECT.
  150. #
  151. ERRCOD = CRRRCN[0]; # REASON CODE #
  152. IF CRLIMBO[0]
  153. THEN # CR/RCN FOR UNSUCCESSFUL SWITCH #
  154. BEGIN
  155. #
  156. * CR/RCN IS FOR AN ABNORMAL RECONNECT (I.E., CR/ACC HAS NOT BEEN
  157. * RECEIVED). CALL *NVFTURT* TO FIND THE *PTAC* ENTRY AND UPDATE
  158. * *RAU* TABLE ACCORDINGLY. SAVE NEW ACN, DECREMENT T-A CONNECTION
  159. * COUNT. IF INTERACTIVE DEVICE, CALL *NVFTDAD* TO DETERMINE
  160. * ADDITIONAL DIALOGUE POSSIBILITY. OTHERWISE, JUST EXIT.
  161. #
  162. PRIAPP = FALSE;
  163. NVFTURT(CRVCB[0],PT,PRIAPP); # UPDATE *RAU* TABLE #
  164.  
  165. PTA$ACN[PT] = CRACN[0]; # SAVE NEW ACN #
  166. PTA$RC[PT] = ERRCOD + RCNRC$; # SAVE RC FOR USE IN CR/TRM #
  167. PTA$LRC[PT] = ERRCOD;
  168. #
  169. * SET THE NEXT APPLICATION NAME IF SPECIFIED.
  170. #
  171. IF CRANAME[0] NQ 0
  172. THEN # NEW APPLICATION SPECIFIED #
  173. BEGIN
  174. PTA$VLTAPP[PT] = XSFW(CRANAME[0]); # SAVE NEW APPL NAME #
  175. PTA$VAF[PT] = TRUE; # SET VOLUNTEERED APPL FLAG #
  176. END
  177. #
  178. * LOCATE AST ENTRY FOR THIS PTAC ENTRY.
  179. #
  180. FOR AS = 0 STEP 1 WHILE
  181. (AS LS ASENTRY AND
  182. AST$PANAM[AS] NQ PTA$SWTAPP[PT])
  183. DO
  184. BEGIN
  185. END
  186. AST$TACN[AS] = AST$TACN[AS] - 1; # DECREMENT NUMBER OF CONN #
  187. AST$ICCN[AS] = AST$ICCN[AS] - 1; #DECREMENT NO OF INCMG CONN #
  188. NVFSCAD(AS); # COMPLETE APPL DEPARTURE #
  189.  
  190. IF (PTA$DT[PT] EQ DT$CONS)
  191. OR (PTA$DT[PT] EQ DT$CLP)
  192. OR (PTA$DT[PT] EQ DT$USER)
  193. THEN # INTERACTIVE DEVICE TYPE #
  194. BEGIN
  195. #
  196. * CHECK IF LOANED CONNECTION.
  197. * IF SO, CALL NVFTRLC TO RETURN CONNECTION TO PRIMARY APPL.
  198. * OTHERWISE, CALL NVFTDAD TO DETERMINE IF ADDITIONAL DIALOGUE
  199. * IS OK. IF SO, THEN CALL NVFTILP TO ISSUE NEXT PROMPT.
  200. #
  201. IF PTA$LRC[PT] LS RCRC"LSA"
  202. THEN
  203. BEGIN
  204. NVFTDAD(PT,ERRCOD);
  205. IF PTA$STATE[PT] EQ PTACST"AWTPRMT"
  206. THEN
  207. NVFTILP(PT);
  208. END
  209. ELSE
  210. BEGIN
  211.  
  212. #
  213. * LOCATE THE *AST* ENTRY OF THE PRIMARY APPL. DECREMENT THE
  214. * NUMBER OF RESERVED CONNECTIONS AND INCREMENT THE NUMBER OF T-A
  215. * CONNECTIONS.
  216. #
  217. FOR AS = 0 STEP 1 WHILE
  218. (AS LS ASENTRY) AND
  219. (AST$AN[AS] NQ PTA$PRIAN[PT])
  220. DO
  221. BEGIN
  222. END
  223. IF AS LS ASENTRY
  224. THEN
  225. BEGIN
  226. AST$RACN[AS] = AST$RACN[AS] - 1;
  227. AST$TACN[AS] = AST$TACN[AS] + 1;
  228. AST$ICCN[AS] = AST$ICCN[AS] + 1;
  229. END
  230. #
  231. * SWITCH THE CONNECTION BACK TO THE PRIMARY APPLICATION.
  232. #
  233. PTA$SWTAPP[PT] = AST$PANAM[AS];
  234. SMOUT = FALSE;
  235. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  236. END
  237. END
  238. END
  239. ELSE
  240. BEGIN
  241. #
  242. * CR/RCN IS FOR A NORMAL RECONNECT. CALL *NVFTPVD* TO ALLOCATE
  243. * SPACE FOR A *PTAC* ENTRY AND MAKE VCB READ REQUEST ENTRY IN
  244. * *VRQ* QUEUE. UPDATE *PTAC* WITH INFORMATION RECEIVED IN THE
  245. * CR/RCN SM.
  246. #
  247. NVFTPVD(CRVCB[0],CRAN[0],PT);
  248.  
  249. PTA$ACN[PT] = CRACN[0]; # SAVE NEW ACN #
  250. PTA$VCB[PT] = CRVCB[0];
  251. PTA$ABL[PT] = CRABL[0];
  252. PTA$DT[PT] = CRDT[0];
  253. PTA$TC[PT] = CRRCTC[0];
  254. PTA$PW[PT] = CRRCPW[0];
  255. PTA$PL[PT] = CRRCPL[0];
  256. PTA$LRC[PT] = CRRRCN[0];
  257. PTA$RC[PT] = ERRCOD + RCNRC$;
  258. #
  259. * SET THE NEXT APPLICATION NAME IF SPECIFIED.
  260. #
  261. IF CRANAME[0] NQ 0
  262. THEN # NEW APPLICATION SPECIFIED #
  263. BEGIN
  264. PTA$VLTAPP[PT] = XSFW(CRANAME[0]); # SAVE NEW APPL NAME #
  265. PTA$VAF[PT] = TRUE; # SET VOLUNTEERED APPL FLAG #
  266. END
  267. #
  268. * IF REASON FOR RECONNECT IS APPLICATION FAILURE/NETOFF, THEN
  269. * SET APPLICATION FAILED FLAG IN THE *PTAC* ENTRY SO THAT USER
  270. * IS GIVEN 25 TRIES VERSUS 4 TO ENTER A LEGAL APPLICATION NAME
  271. * (TO TAKE CARE OF TYPE AHEAD DATA), AND ALSO SET APPLICATION
  272. * DOWN FLAG IN THE *AST* TABLE.
  273. #
  274. IF ERRCOD EQ RCRC"N" OR
  275. ERRCOD EQ RCRC"ANO" OR
  276. ERRCOD EQ RCRC"AF" OR
  277. ERRCOD EQ RCRC"SAN" OR
  278. ERRCOD EQ RCRC"SAF"
  279. THEN
  280. BEGIN
  281. PTA$AFF[PT] = TRUE;
  282. #
  283. * LOCATE AST ENTRY FOR PTAC ENTRY.
  284. #
  285. FOR AS = 0 STEP 1 WHILE
  286. (AS LS ASENTRY AND
  287. AST$PANAM[AS] NQ PTA$SWTAPP[PT])
  288. DO
  289. BEGIN
  290. END
  291. AST$DNF[AS] = TRUE; # SET APPLICATION DOWN FLAG #
  292. END
  293.  
  294. #
  295. * SET *PTAC* STATE ACCORDING TO LOAN CONNECTION FLAG STATUS OF
  296. * THE PTAC ENTRY.
  297. #
  298. IF PTA$LRC[PT] LS RCRC"LSA"
  299. THEN
  300. PTA$STATE[PT] = PTACST"AWTVCBR";
  301. ELSE
  302. BEGIN
  303. PTA$STATE[PT] = PTACST"AWTVCBL";
  304. #
  305. * IF THIS IS AN INTIAL LOAN REQUEST, SAVE THE PRIMARY
  306. * APPLICATION NUMBER IN THE PTAC ENTRY.
  307. #
  308. IF PTA$LRC[PT] EQ RCRC"LSA"
  309. THEN
  310. BEGIN
  311. PTA$PRIAN[PT] = CRAN[0];
  312. END
  313. END
  314.  
  315. #
  316. * CHECK IF EXTENDED OPTIONAL WORDS ARE APPENDED TO THE CR/RCN/R SM.
  317. * IF SO, ALLOCATE SPTAC SPACE AND MOVE THE OPTIONAL WORDS INTO THE
  318. * SPTAC, MARK THE PTAC AND LABEL THE SPTAC SO IT CAN BE LOCATED
  319. * LATER.
  320. #
  321. IF SAVETLC GR LCRRCN
  322. THEN
  323. BEGIN
  324. SPSIZ = SAVETLC - LCRRCN + 1;
  325. SSTETS(P<SPTAC>,0,SPSIZ);
  326. SPT$VCB[0] = PTA$VCB[PT];
  327. SPT$ESIZE[0] = SPSIZ;
  328. P<TEMPFROM> = LOC(CRROPW[0]);
  329. P<TEMPTO> = LOC(SPT$WRD2[0]);
  330. OPTWRDSZ = SPT$ESIZE[0] - 1;
  331. FOR I = 0 STEP 1 WHILE
  332. I LS OPTWRDSZ
  333. DO
  334. BEGIN
  335. TOWRD[I] = FROMWRD[I];
  336. END
  337. PTA$SPTAC[PT] = TRUE;
  338. END
  339. #
  340. * IF A CONSOLE DEVICE, SEARCH THE PDCT TO SEE IF THERE IS
  341. * AN ENTRY FOR THIS DEVICE. IF AN ENTRY IS FOUND, THEN SET THE
  342. * STATE TO AWAITING CONSOLE VALIDATION.
  343. #
  344. IF PTA$DT[PT] EQ DT$CONS
  345. THEN
  346. BEGIN
  347. MATCH = FALSE;
  348. FOR PD=0 STEP PDT$WC[PD] WHILE (NOT MATCH AND PD LS PDTLNGTH)
  349. DO
  350. BEGIN
  351. IF PTA$VCB[PT] EQ PDT$CVCB[PD+1]
  352. THEN
  353. BEGIN
  354. PDT$CSTAT[PD+1] = PDCTST"AWTCVAL";
  355. MATCH = TRUE;
  356. END
  357. END
  358. END
  359. END
  360.  
  361. END # END NVFTRCN #
  362.  
  363. TERM
cdc/nos2.source/nam5871/nvftrcn.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator