User Tools

Site Tools


cdc:nos2.source:nam5871:nvftdsp

NVFTDSP

Table Of Contents

  • [00009] PROC NVFTDSP1)
  • [00010] NVFTDSP - DETERMINE SWITCH POSSIBILITY
  • [00014] DETERMINE SWITCH POSSIBILITY.
  • [00070] PROC ABORT
  • [00071] PROC MESSAGE
  • [00072] PROC MOVE
  • [00073] PROC NVFSCAD
  • [00074] PROC NVFTDAD
  • [00075] PROC NVFTILP
  • [00076] PROC NVFTRLC
  • [00077] PROC NVFUCRS
  • [00078] PROC NVFUMQE
  • [00079] PROC SSCATR
  • [00080] PROC SSTETS
  • [00081] PROC SSTRTS
  • [00082] FUNC EDATE C(10)
  • [00083] FUNC XSFW C(10)
  • [00128] TMBBUF - TIMER REQUEST BUFFER.
  • [00147] EXPBUF - PASSSWORD EXPIRATION WARNING.
  • [00170] NOAST - NO AST ENTRY WAS FOUND MESSAGE.
  • [00182] NOPRI - NO PRIMARY AST ENTRY WAS FOUND MESSAGE.

Source Code

NVFTDSP.txt
  1. *DECK NVFTDSP
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXSMNVF
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7. USETEXT TXTSUSS
  8.  
  9. PROC NVFTDSP((PT),(PD));
  10. # TITLE NVFTDSP - DETERMINE SWITCH POSSIBILITY #
  11.  
  12. BEGIN # NVFTDSP #
  13. #
  14. ** NVFTDSP - DETERMINE SWITCH POSSIBILITY.
  15. *
  16. * E. THAVIKULWAT 81/10/02
  17. * C. BRION 83/04/16, 83/05/10, 83/06/23.
  18. *
  19. * THIS PROCEDURE DETERMINES IF A SWITCH TO THE REQUESTED
  20. * APPLICATION IS POSSIBLE. IF SO, A CR/SWH SM IS ISSUED. IT MAY
  21. * HAPPEN THAT A REQUEST STARTABLE APPLICATION HAS BEEN REQUESTED.
  22. * IN THIS CASE, THE PTAC IS SET TO A NETON PENDING STATE, A TIMER
  23. * REQUEST IS ISSUED AND A "WAITING FOR APPLICATION" MESSAGE SENT TO
  24. * THE TERMINAL.
  25. *
  26. * PROC NVFTDSP((PT),(PD))
  27. *
  28. * ENTRY:
  29. * PT = POINTER TO PTAC ENTRY.
  30. * PD = POINTER TO PDCT ENTRY(ONLY FOR PASSIVE DEVICE).
  31. *
  32. * EXIT:
  33. * ONE OF THE FOLLOWING:
  34. * 1) CR/SWH SM ISSUED.
  35. * 2) APPROPRIATE MESSAGE SENT TO CONSOLE IF SWITCH NOT POSSIBLE.
  36. * 3) PASSIVE DEVICE PUT INTO WAIT STATE IF SWITCH NOT POSSIBLE.
  37. * 4) THE APPLICATION STARTUP INITIATED AND THE PTAC PUT IN NETON
  38. * PENDING STATE.
  39. * 5) IF A LOAN CONNECTION REQUEST, A CR/RCN/N FOLLOWED BY THE
  40. * CR/SWH/R SM IS ISSUED.
  41. * 6) IF A LOAN CONNECTION REQUEST AND THE CONNECTION SWITCH NOT
  42. * POSSIBLE, A CR/RCN/A SM IS ISSUED IN ORDER TO RETURN THE
  43. * CONNECTION BACK TO THE PRIMARY APPLICATION.
  44. *
  45. * NOTES:
  46. * 1) SWITCH FOR CONSOLE IS POSSIBLE IF APPLICATION IS NETON, IS
  47. * ENABLED, NOT DOWN, HAS NOT REACHED THE MAXIMUM CONNECTION
  48. * IT CAN ACCEPT, AND HAS NO DUPLICATE USER FOR THAT
  49. * APPLICATION IF DUPLICATE USER NOT ALLOWED. IF SWITCH NOT
  50. * POSSIBLE, EITHER AN APPROPRIATE MESSAGE IS ISSUED TO THE
  51. * TERMINAL AND APPLICATION PROMPT MAY BE REISSUED OR IF A
  52. * LOAN REQUEST A CR/RCN/A SM IS ISSUED.
  53. * 2) SWITCH FOR PASSIVE DEVICE IS POSSIBLE IF APPLICATION HAS NOT
  54. * REACHED THE MAXIMUM CONNECTION IT CAN ACCEPT. IF SWITCH NOT
  55. * POSSIBLE AND NOT A LOAN REQUEST RECONNECT, THE DEVICE STAYS
  56. * CONNECTED TO NVF UNTIL THE CONSOLE HAS COME BACK AND HAS
  57. * MADE ANOTHER SUCCESSFUL APPLICATION SELECTION OR UNTIL THE
  58. * NPU TERMINATES THE CONNECTION. IF SWITCH NOT POSSIBLE AND
  59. * A LOAN REQUEST RECONNECT THEN A CR/RCN/A SM IS ISSUED TO
  60. * RETURN THE CONNECTION BACK TO THE PRIMARY APPLICATION.
  61. *
  62. #
  63.  
  64. #
  65. **** PROC NVFTDSP - XREF LIST.
  66. #
  67.  
  68. XREF
  69. BEGIN
  70. PROC ABORT; # ABORT NVF #
  71. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  72. PROC MOVE; # MACREL MOVE CM WORDS #
  73. PROC NVFSCAD; # COMPLETE APPLICATION DEPARTURE #
  74. PROC NVFTDAD; # DETERMINE ADDITIONAL DIALOGUE #
  75. PROC NVFTILP; # ISSUE LOGIN PROMPT #
  76. PROC NVFTRLC; # REFUSE LOAN REQUEST CONNECTION #
  77. PROC NVFUCRS; # CHECK REQUEST STARTABLE #
  78. PROC NVFUMQE; # TRANSFER SM TO QUEUE #
  79. PROC SSCATR; # SS-ACCEPT TIMER REQUEST #
  80. PROC SSTETS; # ENLARGE TABLE SPACE #
  81. PROC SSTRTS; # SS-RELEASE TABLE SPACE #
  82. FUNC EDATE C(10); # CONVERT PACKED DATE TO DISPLAY CODE #
  83. FUNC XSFW C(10); # SPACE FILL WORD #
  84. END
  85.  
  86. #
  87. ****
  88. #
  89.  
  90.  
  91. ITEM ADDR I; # ADDRESS VARIABLE FOR CR/RCN/N #
  92. ITEM ANUM I; # APPLICATION NUMBER VARIABLE #
  93. ITEM AS I; # SUBSCRIPT FOR ARRAY AST #
  94. ITEM ASENTRY I; # NUMBER OF AST ENTRIES #
  95. ITEM ASTORD I; # LOCAL AST ORDINAL #
  96. ITEM CTYP I; # CONNECTION TYPE FOR NVFUCRS CALL #
  97. ITEM ERRCOD I; # ERROR CODE FOR PROC *NVFTDAD* #
  98. ITEM ERRKOD I; # ERROR CODE FOR RCN/A AND/OR CR/SWH #
  99. ITEM I I; # LOOP VARIABLE #
  100. ITEM IDX I; # INDEX FOR 2ND HALF OF *MSGBUF* #
  101. ITEM NOSPTAC B; # SPTAC SEARCH FLAG #
  102. ITEM PASTMATCH B; # PRIMARY AST MATCH ID #
  103. ITEM PD I; # SUBSCRIPT FOR ARRAY PDCT #
  104. ITEM PORD I; # LOCAL LOOP AND PRIMARY AST ORD #
  105. ITEM PRIORD I; # PRIMARY AST ORDINAL #
  106. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  107. ITEM PTDT I; # SUBSCRIPT FOR GOTO SWITCH #
  108. ITEM RA I; # SUBSCRIPT FOR ARRAY RAU #
  109. ITEM RAU$ENTRY I; # NUMBER OF ENTRIES IN RAU TABLE #
  110. ITEM RETORD I; # RETURN AST ORDINAL FOR NVFUCRS #
  111. ITEM RETSTAT U; # RETURN RETSTAT FOR NVFUCRS #
  112. ITEM SAS I; # SPTAC LOOP COUNTER, ENTRY ORDINAL #
  113. ITEM SIZEA I; # SPTAC SIZE #
  114. ITEM SIZEB I; # SPTAC AND SM SIZES #
  115. ITEM SMOUT B; # SM TYPE, TRUE=CR/RCN/A, FALSE=CR/SWH/R #
  116. ITEM TOTALCN I; # TOTAL NUMBER OF CONNECTIONS #
  117.  
  118. SWITCH DTYPSWT:DTSTAT
  119. LLINT : SCON, # LABEL FOR CONSOLE DEVICE TYPE #
  120. LLPASV : SCR, # LABEL FOR CARD READER DEVICE #
  121. LLPASV : SLP, # LABEL FOR LINE PRINTER DEVICE #
  122. LLPASV : SCP, # LABEL FOR CARD PUNCH DEVICE #
  123. LLPASV : SPL, # LABEL FOR PLOTTER DEVICE #
  124. LLINT : SCLP, # LABEL FOR CDCNET LINE PRINTER (PSU) #
  125. LLINT : SUSER; # LABEL FOR USER DEVICE TYPE #
  126.  
  127. #
  128. ** TMBBUF - TIMER REQUEST BUFFER.
  129. *
  130. * BUFFER CONTAINING THE TIMER INFO. SET UP TO CONTAIN THE
  131. * FC/INACT SM WHICH IS RETURNED TO THE TAINPQ WHEN THE TIMER EXPIRES.
  132. #
  133. ARRAY TMBBUF[00:00] S(TMBSIZ$);
  134. BEGIN
  135. ITEM TMB$SMID S:CTQSTAT(00,00,12) = [S"SINA"];
  136. ITEM TMB$WC U(00,48,12) = [TMBSIZ$];
  137. ITEM TMB$ABT U(01,00,06) = [APPCMD];
  138. ITEM TMB$CNUM U(01,18,18);
  139. ITEM TMB$PFCSFC U(02,00,16) = [FCINA];
  140. ITEM TMB$ACN U(02,24,12);
  141. ITEM TMB$DELAY U(03,24,18) = [NETPTIME$];
  142. ITEM TMB$QNUM U(03,42,18);
  143. END
  144.  
  145.  
  146. #
  147. ** EXPBUF - PASSSWORD EXPIRATION WARNING.
  148. #
  149. ARRAY EXPBUF[00:00] S(5);
  150. BEGIN
  151. ITEM EXP$MSG C(00,00,30) = [".YOUR PASSWORD EXPIRES AT 00.0"];
  152. ITEM EXP$MSG1 C(03,00,07) = ["0.00 ON"];
  153. ITEM EXP$DATE C(03,42,10); # DATE IN YY/MM/DD FORMAT #
  154. ITEM EXP$ZERO U(04,42,18) = [0];
  155. END
  156.  
  157. #
  158. * EXPDATE - DATE AS IT APPEARS IN MSG$BUF
  159. #
  160. ARRAY EXPDATE[00:00] S(1);
  161. BEGIN
  162. ITEM EXWORD U(00,00,60); # FULL WORD OF DATA #
  163. ITEM EXLOW18 U(00,42,18); # LOWER 18 BITS OF WORD #
  164. ITEM EXYEAR U(00,42,06); # YEAR - 1970 #
  165. ITEM EXMONTH U(00,48,06); # MONTH #
  166. ITEM EXDATE U(00,54,06); # DATE #
  167. END
  168.  
  169. #
  170. ** NOAST - NO AST ENTRY WAS FOUND MESSAGE.
  171. #
  172. $BEGIN
  173. ARRAY NOAST [00:00] S(5);
  174. BEGIN
  175. ITEM NO$MSG C(00,00,36) =
  176. ["NVFTDSP - CANNOT FIND AST ENTRY FOR "];
  177. ITEM NO$ANAM C(03,36,07);
  178. ITEM NO$ZERO U(04,18,42) = [0];
  179. END
  180.  
  181. #
  182. ** NOPRI - NO PRIMARY AST ENTRY WAS FOUND MESSAGE.
  183. #
  184. ARRAY NOPRI [00:00] S(5);
  185. BEGIN
  186. ITEM NOP$MSG C(00,00,40) =
  187. ["NVFTDSP - CANNOT FIND PRIMARY AST ENTRY."];
  188. ITEM NOP$ZERO U(04,00,60) = [0];
  189. END
  190. $END
  191.  
  192. #
  193. * TEMPORARY BASED ARRAYS FOR USE WHEN CALLING THE *MOVE* ROUTINE.
  194. #
  195. BASED ARRAY TEMPFROM [00:00] S(1);
  196. BEGIN
  197. ITEM FROMWRD U(00,00,60);
  198. END
  199.  
  200. BASED ARRAY TEMPTO [00:00] S(1);
  201. BEGIN
  202. ITEM TOWRD U(00,00,60);
  203. END
  204.  
  205. CONTROL EJECT;
  206.  
  207. #
  208. * NVFTDSP MAIN LINE STARTS HERE.
  209. *
  210. * DETERMINE NUMBER AST ENTRIES.
  211. #
  212. ASENTRY = ASTLNGTH/ASTSIZ$;
  213.  
  214. #
  215. * CLEAR OUTGOING SM BUFFER (2ND HALF OF *MSGBUF*).
  216. #
  217. IDX = (NMSGBUF$ + 1) / 2; # INDEX TO 2ND HALF OF *MSGBUF* #
  218. FOR I = IDX STEP 1 UNTIL NMSGBUF$
  219. DO
  220. BEGIN
  221. MSG$WORD[I] = 0;
  222. END
  223.  
  224. PTDT = PTA$DT[PT];
  225. GOTO DTYPSWT[PTDT];
  226.  
  227. #
  228. * CONSOLE DEVICE TYPE. IF SWITCH IS POSSIBLE, OBTAIN VALIDATION
  229. * DATA FOR CR/SWH SM FROM PTAC ENTRY. IF NOT POSSIBLE, CALL
  230. * *NVFTDAD* WITH APPROPRIATE ERROR CODE AND EXIT.
  231. #
  232. LLINT: # CONSOLE DEVICE TYPE #
  233. PASTMATCH = FALSE;
  234. FOR ASTORD = 0 STEP 1 WHILE
  235. (ASTORD LS ASENTRY) AND NOT PASTMATCH
  236. DO
  237. BEGIN
  238. IF (AST$PANAM[ASTORD] EQ PTA$SWTAPP[PT])
  239. OR
  240. ((AST$SANAM[ASTORD] EQ PTA$SWTAPP[PT]) AND
  241. (AST$SANAM[ASTORD] NQ AST$PANAM[ASTORD]))
  242. THEN
  243. BEGIN
  244. PASTMATCH = TRUE;
  245. END
  246. END
  247.  
  248. $BEGIN
  249. IF NOT PASTMATCH
  250. THEN
  251. BEGIN
  252. NO$ANAM[0] = PTA$SWTAPP[PT];
  253. MESSAGE(NOAST[0],0);
  254. ABORT;
  255. END
  256. $END
  257.  
  258. ASTORD = ASTORD - 1;
  259. AS = ASTORD;
  260. #
  261. * IF A LOANED CONNECTION IS BEING RETURNED TO THE PRIMARY APPL,
  262. * DECREMENT THE RESERVED CONNECTION COUNT FOR THE PRIMARY APPL.
  263. #
  264. IF PTA$LRC[PT] GR RCRC"LSA"
  265. THEN
  266. BEGIN
  267. AST$RACN[ASTORD] = AST$RACN[ASTORD] - 1;
  268. END
  269. #
  270. * CHECK FOR REQUEST STARTABLE TYPE OF APPLICATION, OR FOR AN
  271. * APPLICATION THAT CAN HAVE MULTIPLE COPIES.
  272. #
  273.  
  274. PTA$SWTAN[PT] = AST$AN[ASTORD];
  275. IF AST$RS[ASTORD] OR
  276. (AST$MXCOP[ASTORD] GR 1)
  277. THEN
  278. BEGIN
  279. #
  280. * APPLICATION IS REQUEST STARTABLE OR CAN HAVE MULTIPLE COPIES.
  281. * CALL NVFUCRS TO HANDLE FURTHUR PROCESSING. UPON RETURN,
  282. * DEPENDENT ON RETSTAT, EITHER SET ERROR CODE OR SET PTAC STATE TO
  283. * NETON PENDING, START TIMER AND RETURN.
  284. #
  285.  
  286. RETORD = 0;
  287. RETSTAT = CONNOK$;
  288. CTYP = TACON$;
  289.  
  290. NVFUCRS(ASTORD,RETORD,RETSTAT,CTYP);
  291.  
  292. IF RETSTAT EQ NOCONN$ OR
  293. RETSTAT EQ MCLIMIT$
  294. THEN
  295. BEGIN
  296. #
  297. * CONNECTION NOT POSSIBLE.
  298. * IF A LOAN REQUEST CONNECTION TYPE, CALL NVFTRLC
  299. * TO RESTORE VCB, ISSUE VCB WRITE REQUEST, ISSUE CR/RCN/A SM
  300. * AND RELEASE THE PTAC AND SPTAC IF IT EXISTS.
  301. #
  302.  
  303. IF PTA$LRC[PT] EQ RCRC"LSA"
  304. THEN
  305. BEGIN
  306. SMOUT = TRUE;
  307. PTA$LRC[PT] = RCRC"SLE";
  308. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  309. RETURN;
  310. END
  311. #
  312. * NOT A LOANED REQUEST TYPE OF CONNECTION.
  313. #
  314. IF RETSTAT EQ NOCONN$
  315. THEN # APPL NOT AVAILABLE #
  316. ERRCOD = ECANP$;
  317. ELSE # MAX COPIES/CONNECTIONS REACHED#
  318. ERRCOD = ECABSY$;
  319. NVFTDAD(PT,ERRCOD);
  320. IF PTA$STATE[PT] EQ PTACST"AWTPRMT"
  321. THEN
  322. BEGIN
  323. NVFTILP(PT);
  324. RETURN;
  325. END
  326. END
  327. ELSE IF RETSTAT EQ NETP$
  328. THEN
  329. BEGIN
  330. #
  331. * REQUESTED APPL IS BEING STARTED UP.
  332. * CONNECTION IN NETON PENDING STATE.
  333. * SETUP TIMER TO PROTECT AGAINST APPLICATION NEVER NETTING ON
  334. * AND HANGING THE CONNECTION.
  335. #
  336. ERRCOD = ECAPNETP$;
  337. PTA$STATE[PT] = PTACST"AWTNETP";
  338. TMB$ACN[0] = PTA$ACN[PT];
  339. TMB$QNUM[0] = LOC(P<TAINPQ>);
  340. SSCATR(TMBBUF[0]);
  341. PTA$CNUM[PT] = TMB$CNUM[0];
  342. PTA$SWTAPP[PT] = AST$PANAM[ASTORD];
  343. AS = RETORD;
  344. RETURN;
  345. END
  346. ELSE IF RETSTAT EQ CONNOK$
  347. THEN
  348. BEGIN
  349. AS = RETORD;
  350. PTA$SWTAPP[PT] = AST$PANAM[RETORD];
  351. PTA$SWTAN[PT] = AST$AN[RETORD];
  352. END
  353. END
  354. #
  355. * TO HERE, AN APPLICATION AVAILABLE FOR THE CONNECTION.
  356. * CHECK THE MAX NUMBER OF CONNECTIONS.
  357. #
  358. ANUM = AST$AN[AS];
  359. TOTALCN = AST$TACN[AS] + AST$AACN[AS] + AST$RACN[AS];
  360. IF (ANUM EQ 0) OR (TOTALCN GQ AST$MCN[AS])
  361. OR (AST$DIF[AS]) OR (AST$DNF[AS])
  362. THEN
  363. BEGIN
  364. #
  365. * SWITCH NOT POSSIBLE. EITHER APPLICATION IS INACTIVE, AT MAX
  366. * NUMBER OF CONNECTIONS, DISABLED OR DOWN.
  367. #
  368. ERRCOD = ECANP$;
  369. IF (ANUM NQ 0) AND (TOTALCN GQ AST$MCN[AS])
  370. THEN
  371. BEGIN
  372. #
  373. * REQUESTED APPLICATION AT CONNECTION LIMIT.
  374. #
  375. IF PTA$LRC[PT] LS RCRC"LSA"
  376. THEN
  377. BEGIN
  378. ERRCOD = ECABSY$;
  379. END
  380. ELSE
  381. BEGIN
  382. ERRCOD = 0;
  383. END
  384. END
  385. #
  386. * IF A LOAN REQUEST TYPE OF CONNECTION, THEN MUST SEND THE
  387. * CONNECTION BACK TO THE PRIMARY APPLICATION.
  388. #
  389. IF PTA$LRC[PT] LS RCRC"LSA"
  390. THEN
  391. BEGIN
  392. #
  393. * NOT A LOAN REQUEST TYPE OF CONNECTION.
  394. * DETERMINE ADDITIONAL DIALOGUE POSSIBILITY AND ISSUE PROMPT
  395. * IF SO DETERMINED.
  396. #
  397. NVFTDAD(PT,ERRCOD);
  398. IF PTA$STATE[PT] EQ PTACST"AWTPRMT"
  399. THEN
  400. BEGIN
  401. NVFTILP(PT);
  402. END
  403. RETURN;
  404. END
  405. ELSE
  406. BEGIN
  407. #
  408. * LOAN REQUEST TYPE OF CONNECTION.
  409. * IF INITIAL LOAN FROM PRIMARY TO SECONDARY, ISSUE A
  410. * CR/RCN/A SM VIA CALL TO NVFTRLC.
  411. #
  412. IF PTA$LRC[PT] EQ RCRC"LSA"
  413. THEN
  414. BEGIN
  415. SMOUT = TRUE;
  416. PTA$LRC[PT] = RCRC"SNA";
  417. IF (ANUM NQ 0) AND (TOTALCN GQ AST$MCN[AS])
  418. THEN
  419. BEGIN
  420. PTA$LRC[PT] = RCRC"SLE";
  421. END
  422. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  423. RETURN;
  424. END
  425. END
  426. END
  427. ELSE
  428. BEGIN
  429. #
  430. * SWITCH STILL POSSIBLE.
  431. * CHECK IF DUPLICATE USER ALLOWED.
  432. #
  433. IF AST$UIDF[AS] AND
  434. (PTA$LRC[PT] LQ RCRC"LSA")
  435. THEN
  436. BEGIN
  437. #
  438. * DUPLICATE USER NOT ALLOWED. CHECK *RAU* TABLE FOR DUPLICATE
  439. * USER. IF DUPLICATE, CALL *NVFTDAD* AND EXIT. IF NOT,
  440. * MAKE ENTRY IN *RAU* TABLE AND PROCEED TO BUILD CR/SWH SM.
  441. #
  442. RAU$ENTRY = RAULNGTH / RAUSIZ$;
  443. FOR I = 0 STEP 1 WHILE (I LS RAU$ENTRY)
  444. DO
  445. BEGIN
  446. IF (RAU$AN[I] EQ ANUM) AND (RAU$UIDX[I] EQ PTA$UIDX[PT])
  447. AND (RAU$FNAM[I] EQ PTA$FNAM[PT])
  448. THEN
  449. BEGIN
  450. ERRCOD = ECABSY$;
  451. #
  452. * DUPLICATE USER, CAN NOT SWITCH.
  453. *
  454. #
  455. IF PTA$LRC[PT] LS RCRC"LSA"
  456. THEN
  457. BEGIN
  458. #
  459. * NON LOAN REQUEST TYPE OF CONNECTION.
  460. * DETERMINE ADDITIONAL DIALOGUE POSSIBILITY AND ISSUE PROMPT
  461. * IF SO DETERMINED.
  462. #
  463. NVFTDAD(PT,ERRCOD);
  464. IF PTA$STATE[PT] EQ PTACST"AWTPRMT"
  465. THEN
  466. BEGIN
  467. NVFTILP(PT);
  468. END
  469. RETURN;
  470. END
  471. ELSE
  472. BEGIN
  473. #
  474. * LOAN REQUEST TYPE OF CONNECTION.
  475. * IF INITIAL LOAN FROM PRIMARY TO SECONDARY, ISSUE A
  476. * CR/RCN/A SM VIA CALL TO NVFTRLC.
  477. #
  478. IF PTA$LRC[PT] EQ RCRC"LSA"
  479. THEN
  480. BEGIN
  481. SMOUT = TRUE;
  482. PTA$LRC[PT] = RCRC"SNA";
  483. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  484. RETURN;
  485. END
  486. END
  487. END
  488. END
  489. #
  490. * NOT A DUPLICATE USER. GENERATE RAU TABLE ENTRY. NOTE THAT THE CUR-
  491. * RENT CONTENT OF I IS THE INDEX TO THE NEW ENTRY.
  492. #
  493. RA = RAULNGTH; # OFFSET FROM BEGINNING OF RAU TABLE #
  494. SSTETS(P<RAU>,RA,RAUSIZ$); # ALLOCATE SPACE FOR RAU ENTRY #
  495. RAU$AN[I] = ANUM; # SAVE APPLICATION NUMBER #
  496. RAU$UIDX[I] = PTA$UIDX[PT]; # SAVE USER INDEX #
  497. RAU$FNAM[I] = PTA$FNAM[PT]; # SAVE FAMILY NAME #
  498. END
  499. #
  500. * ISSUE THE PASSWORD EXPIRATION WARNING MESSAGE
  501. #
  502.  
  503. IF (NOT PTA$PWEXPF[PT]) # PASSWRD EXP MESSAGE NOT SENT#
  504. THEN
  505. BEGIN
  506. EXWORD[0] = PTA$EXPDAT[PT]; # PASSWORD EXPIRATION DATE #
  507. IF (EXLOW18[0] NQ 0) # A EXPIRING PASSWORD #
  508. THEN
  509. BEGIN
  510. EXP$DATE[0] = EDATE(EXLOW18[0]);# DATE IN DISPLAY CODE #
  511. NVFUMQE(P<CTQ>,EXPBUF[0],APPTTX$,PTA$ACN[PT],50);
  512. END
  513. PTA$PWEXPF[PT] = TRUE; # MESSAGE SENT TO USER #
  514. END
  515. END
  516. #
  517. * SWITCH FOR CONSOLE IS POSSIBLE.
  518. * CHECK IF INITIAL LOAN REQUEST. IF SO, SEND THE CR/RCN/N SM, AS
  519. * THIS WAS NOT DONE IN *NVFTRVD*.
  520. #
  521.  
  522. IF PTA$LRC[PT] EQ RCRC"LSA"
  523. THEN
  524. BEGIN
  525. SPMSG0[1] = 0;
  526. PFCSFC[1] = CRRCNN;
  527. CRACN[1] = PTA$ACN[PT];
  528. CRNXP[1] = TRUE;
  529. CRICT[1] = ICT$;
  530. CRALN[1] = ALN$;
  531. ADDR = 0;
  532. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRRCNN);
  533. SPMSG0[1] = 0;
  534. END
  535. #
  536. * NOW SET UP THE CR/SWH/R SM.
  537. #
  538. CRSAHMT[1] = PTA$AHMT[PT];
  539. CRSAHDS[1] = PTA$AHDS[PT];
  540. CRSAAWC[1] = PTA$AAWC[PT];
  541. CRSATWD[1] = PTA$ATWD[PT];
  542. GOTO ENDDTYP;
  543.  
  544. #
  545. * PASSIVE DEVICE TYPE. IF SWITCH IS POSSIBLE, OBTAIN VALIDATION
  546. * DATA FOR CR/SWH SM FROM PDCT ENTRY. IF NOT POSSIBLE, JUST EXIT.
  547. #
  548. LLPASV:
  549. PASTMATCH = FALSE;
  550. #
  551. * LOCATE THE APPLICATION FOR THE CONNECTION.
  552. * FOR PASSIVE DEVICES, THE APPLICATION MAY BE A ONE OF THE
  553. * FOLLOWING TYPE OF APPLICATION:
  554. *
  555. * 1) PRIMARY APPLICATION THAT IS ACTIVE.
  556. * 2) SECONDARY APPLICATION THAT IS ACTIVE.
  557. #
  558. FOR ASTORD = 0 STEP 1 WHILE
  559. (ASTORD LS ASENTRY) AND NOT PASTMATCH
  560. DO
  561. BEGIN
  562. IF ((AST$PANAM[ASTORD] EQ PDT$CAPP[PD+1]) AND
  563. (AST$AN[ASTORD] NQ 0))
  564. OR
  565. ((AST$SANAM[ASTORD] EQ PDT$CAPP[PD+1]) AND
  566. (AST$AN[ASTORD] NQ 0) AND
  567. (AST$SANAM[ASTORD] NQ AST$PANAM[ASTORD]))
  568. THEN
  569. BEGIN
  570. PASTMATCH = TRUE;
  571. END
  572. END
  573.  
  574. $BEGIN
  575. IF NOT PASTMATCH
  576. THEN
  577. BEGIN
  578. NO$ANAM[0] = PDT$CAPP[PD+1];
  579. MESSAGE(NOAST[0],0);
  580. ABORT;
  581. END
  582. $END
  583.  
  584. ASTORD = ASTORD - 1;
  585. AS = ASTORD;
  586. #
  587. * APPLICATION FOUND. CHECK CONNECTION LIMIT.
  588. #
  589. TOTALCN = AST$TACN[AS] + AST$AACN[AS] + AST$RACN[AS];
  590. IF (TOTALCN GQ AST$MCN[AS])
  591. THEN
  592. BEGIN
  593. #
  594. * APPLICATION AT CONNECTION LIMIT. PASSIVE DEVICES HELD
  595. * AT THIS POINT. CONSOLE CONNECTION ACTIVITY WILL FORCE THE
  596. * RELOCATION OF THE PASSIVE DEVICES.
  597. #
  598. RETURN;
  599. END
  600. #
  601. * SWITCH FOR PASSIVE DEVICE IS POSSIBLE. SAVE FAMILY NAME, USER
  602. * NUMBER, AND APPLICATION NAME IN PTAC ENTRY AS *NVFTIAM* (ISSUE
  603. * ACCOUNT DAYFILE MESSAGE) EXPECTS IT TO BE IN THE PTAC. PICK UP
  604. * VALIDATION DATA FOR CR/SWH SM FROM PDCT ENTRY.
  605. #
  606. PTA$FWORD[PT] = PDT$FWORD[PD+2];
  607. PTA$UWORD[PT] = PDT$UWORD[PD+3];
  608. PTA$SWTAPP[PT] = PDT$CAPP[PD+1];
  609. PTA$SWTAN[PT] = AST$AN[AS]; # RESTORE APPLICATION NUMBER #
  610.  
  611. #
  612. * CHECK IF INITIAL LOAN REQUEST. IF SO, MUST SEND CR/RCN/N SM.
  613. #
  614.  
  615. IF PTA$LRC[PT] EQ RCRC"LSA"
  616. THEN
  617. BEGIN
  618. SPMSG0[1] = 0;
  619. PFCSFC[1] = CRRCNN;
  620. CRACN[1] = PTA$ACN[PT];
  621. CRNXP[1] = TRUE;
  622. CRICT[1] = ICT$;
  623. CRALN[1] = ALN$;
  624. ADDR = 0;
  625. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCRRCNN);
  626. SPMSG0[1] = 0;
  627. END
  628. #
  629. * NOW SET UP THE CR/SWH/R SM.
  630. #
  631.  
  632. CRSWOCN[1] = PTA$OCN[PT];
  633. CRSAHMT[1] = PDT$AHMT[PD+4];
  634. CRSAHDS[1] = PDT$AHDS[PD+5];
  635. CRSAAWC[1] = PDT$AAWC[PD+6];
  636. CRSATWD[1] = PDT$ATWD[PD+7];
  637.  
  638. GOTO ENDDTYP;
  639.  
  640. ENDDTYP: # COMMON END PROCESSING #
  641. ANUM = AST$AN[AS];
  642. AST$TACN[AS] = AST$TACN[AS] + 1; # INCREMENT NUM OF CONNS. #
  643. AST$ICCN[AS] = AST$ICCN[AS] + 1;
  644. #
  645. * COMPLETE BUILDING CR/SWH SM.
  646. #
  647. PFCSFC[1] = CRSWH;
  648. CRNACN[1] = PTA$ACN[PT];
  649. CRABL[1] = PTA$ABL[PT];
  650. CRSWSDT[1] = PTA$SDT[PT];
  651. CRDT[1] = PTA$DT[PT];
  652. CRSWTC[1] = PTA$TC[PT];
  653. CRSWIC[1] = PTA$ICF[PT];
  654. CRSWORD[1] = PTA$DO[PT];
  655. CRSTNAM[1] = XSFW(PTA$TN[PT]);
  656. CRSWPW[1] = PTA$PW[PT];
  657. CRSWPL[1] = PTA$PL[PT];
  658. CRSWSL[1] = PTA$SL[PT];
  659. CRSWNET[1] = PTA$NET[PT];
  660. CRSWDBZ[1] = PTA$DBZ[PT];
  661. CRSWXBZ[1] = PTA$XBZ[PT];
  662. CRSWUBZ[1] = PTA$UBZ[PT];
  663. CRSWHW[1] = PTA$HW[PT];
  664. CRSWVTP[1] = PTA$VTP[PT];
  665. CRSWAN[1] = ANUM;
  666. CRSWFAM[1] = XSFW(PTA$FNAM[PT]);
  667. CRSWFO[1] = PTA$FORD[PT];
  668. CRSWUN[1] = XSFW(PTA$UNUM[PT]);
  669. CRSWUI[1] = PTA$UIDX[PT];
  670. #
  671. * SET THE LOAN STATUS FIELD IF THIS IS A LOAN TYPE OF CONNECTION.
  672. * FOR A NON-LOAN CONNECTION, THE LOAN STATUS IS ZERO.
  673. #
  674. IF PTA$LRC[PT] LS RCRC"LSA"
  675. THEN
  676. BEGIN
  677. CRSWLST[1] = 0;
  678. END
  679. ELSE
  680. BEGIN
  681. CRSWLST[1] = PTA$LRC[PT];
  682. END
  683. #
  684. * CHECK IF EXTENDED OPTIONAL WORDS ARE AVAILABLE.
  685. * IF SO, APPEND THE OPTIONAL WORDS FROM THE SPTAC ENTRY
  686. * TO THE CR/SWH/R SM.
  687. * DELETE THE SPTAC ENTRY WHEN FINISHED.
  688. #
  689. SIZEB = 0;
  690. SIZEA = LCRSWH;
  691. IF PTA$SPTAC[PT]
  692. THEN
  693. BEGIN
  694. NOSPTAC = TRUE;
  695. FOR SAS = 0 STEP SPT$ESIZE[SAS] WHILE
  696. ((SAS LS SPTACL) AND NOSPTAC)
  697. DO
  698. BEGIN
  699. IF SPT$VCB[SAS] EQ PTA$VCB[PT]
  700. THEN
  701. BEGIN
  702. SIZEB = SPT$ESIZE[SAS] - 1;
  703. P<TEMPFROM> = LOC(SPT$WRD2[SAS]);
  704. P<TEMPTO> = LOC(CRSOPW[1]);
  705. FOR I = 0 STEP 1 WHILE
  706. I LS SIZEB
  707. DO
  708. BEGIN
  709. TOWRD[I] = FROMWRD[I];
  710. END
  711. SSTRTS(P<SPTAC>,SAS,SPT$ESIZE[SAS]);
  712. PTA$SPTAC[PT] = FALSE;
  713. NOSPTAC = FALSE;
  714. SIZEA = SIZEA + SIZEB;
  715. END
  716. END
  717. END
  718. #
  719. * IF THIS IS A LOANED CONNECTION THAT IS BEING RETURNED TO THE
  720. * PRIMARY APPLICATION, CLEAR THE LOAN FLAG, AS IT IS NO LONGER
  721. * "ON LOAN".
  722. #
  723. IF PTA$LRC[PT] GR RCRC"LSA"
  724. THEN
  725. BEGIN
  726. PTA$LCF[PT] = FALSE;
  727. END
  728. #
  729. * CLEAR ACN FIELD OF PTAC ENTRY AS ACN COULD BE REUSED AFTER A
  730. * CR/SWH REQUEST IS ISSUED.
  731. #
  732. PTA$ACN[PT] = 0;
  733. NVFUMQE(P<CTQ>,APSM[1],APPPR$,0,SIZEA);
  734. RETURN;
  735. END # END NVFTDSP #
  736. TERM
1)
PT),(PD
cdc/nos2.source/nam5871/nvftdsp.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator