User Tools

Site Tools


cdc:nos2.source:nam5871:hcsttp

HCSTTP

Table Of Contents

  • [00020] PROC HCSTTP1)
  • [00121] PROC HBSTTP
  • [00122] PROC BLINK
  • [00123] PROC ABORT
  • [00124] PROC LOCLLCB
  • [00125] PROC NCSTTP
  • [00126] PROC OMSG
  • [00127] PROC OSCHAPP
  • [00128] PROC OVLCALL
  • [00129] PROC XSTTP
  • [00130] PROC XTRACE
  • [00131] PROC MGETS
  • [01159] PROC CRACNBP

Source Code

HCSTTP.txt
  1. *DECK HCSTTP
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNB
  5. USETEXT ACNT
  6. USETEXT AHEADER
  7. USETEXT APPSTAT
  8. USETEXT AT
  9. USETEXT DRHDR
  10. USETEXT DUMPFLG
  11. USETEXT MSGIDX
  12. USETEXT NCNB
  13. USETEXT OVERLAY
  14. USETEXT PARAMP
  15. USETEXT PARAMS
  16. USETEXT PT
  17. USETEXT PWL
  18. USETEXT STPRESP
  19. USETEXT SUPMSG
  20. PROC HCSTTP((ACBAD),(ACN),(TRIGGER),(SMPTR));
  21. STARTIMS;
  22. #
  23. *1DC HCSTTP
  24. *
  25. * 1. PROC NAME AUTHOR DATE
  26. * HCSTTP C. BITTNER 81/05/15
  27. *
  28. * 2. FUNCTIONAL DESCRIPTION
  29. * HOST CONNECTION STATE TABLE PROCESSOR
  30. *
  31. * 3. METHOD USED
  32. * VALIDATE TRIGGER. SET CURRENT STATE (IF THERE IS NO ACNB
  33. * THEN SET THE CURRENT STATE TO STATX). CALL XSTTP (STATE
  34. * TABLE PROCESSOR) PASSING THE STATE TABLE ORDINAL, CURRENT
  35. * CONNECTION STATE AND TRIGGER. IF A LEGAL TRIGGER IS
  36. * RETURNED, THEN DO THE FOLLOWING (IF VALUE NOT SET
  37. * TO NOCHG):
  38. * A) ACTION - EXECUTE HOST CONNECTION STATE TABLE ACTION
  39. * (ISSUE SM, ETC)
  40. * B) NEWSTATE - UPDATE NEW HOST CONNECTION STATE
  41. * C) TRIGC - TRIGGER NETWORK CONNECTION STATE TABLE
  42. * D) TRIGB - TRIGGER NETWORK BLOCK PROTOCOL (IVT) STATE TABLE.
  43. *
  44. * IF AN ILLEGAL TRIGGER IS RETURNED THEN DO THE FOLLOWING:
  45. * IF THE TRIGGER IS INTERNAL TO NIP THEN ABORT NIP.
  46. * IF ILLEGAL EXTERNAL TRIGGER ISSUE ERR/LGL TO
  47. * APPLICATION.
  48. *
  49. *
  50. *
  51. * 4. ENTRY PARAMETERS
  52. * ACBAD - ACB ADDRESS
  53. * ACN - APPLICATION CONNECTION NUMBER
  54. * TRIGGER - HOST CONNECTION STATE TABLE TRIGGER NUMBER
  55. * SMPTR - ADDRESS OF SM BUFFER
  56. *
  57. * 5. EXIT PARAMETERS
  58. * NONE
  59. *
  60. * 6. SYMPL TEXTS USED
  61. * NIPDEF ACB
  62. * ACNB ACNT
  63. * APPSTAT AHEADER
  64. * AT MSGIDX
  65. * NCNB PARAMP
  66. * PT
  67. * PARAMS OVERLAY
  68. * STPRESP
  69. *
  70. * 7. ROUTINES CALLED
  71. * HBSTTP - HOST BLOCK PROTOCOL STATE TABLE PROCESSOR
  72. * LOCLLCB - LOCATE LLCB
  73. * NCSTTP - NETWORK CONNECTION STATE TABLE PROCESSOR
  74. * XSTTP - STATE TABLE PROCESSOR
  75. * ABORT - ABORT NIP
  76. * OSCHAPP - SWAPIN APPLICATION
  77. * OVLCALL - LOAD AND EXECUTE OVERLAY
  78. * CRACNB - INTERNAL PROCEDURE TO CREATE ACNB
  79. * STRTCON OVL TRIGGER CONNECTION CREATION ROUTINES
  80. * HCRCBU OVL SEND CR/CB/U
  81. * HCONCBU OVL SEND CON/CB/U
  82. * HTCHAR OVL SEND TCH/TCHAR
  83. * UPACNB4 OVL UPDATE ACNB ON RECEIPT OF CR/RCN/N
  84. * HCACRQA OVL SEND CON/ACRQ/A
  85. * STRTSW OVL TRIGGER CONNECTION SWITCHING ROUTINES
  86. * HCRRCNR OVL SEND CR/RCN/R
  87. * HCRTRMN OVL SEND CR/TRM/N
  88. * HCRIAPR OVL SEND CR/IAP/R
  89. * HSFCINA OVL SEND FC/INACT SUP MSG TO APP
  90. * HSWACNB OVL SWITCH ACNB FROM OLD APP TO NEW APP
  91. * SENDACC OVL TRIGGER CONNECTION ACCEPTED PROCESSORS
  92. * RELACB OVL RELEASE ACB
  93. * HCONEND OVL SEND CON/END/N
  94. * STPHERR OVL ISSUE STATE TABLE ERROR MESSAGE
  95. * HLGLERR OVL SEND ERR/LGL
  96. * XERRMSG OVL OUTPUT ERROR MESSAGE
  97. *
  98. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  99. * "INVALID TRIGGER NUMBER - HCSTTP"
  100. * "NIP INTERNAL ERROR - HCSTTP1"
  101. * "NIP INTERNAL ERROR - HCSTTP2"
  102. *
  103. * THIS PROCEDURE IS CALLED BY HAPFAIL,HBSTTP,HPNOFF,
  104. * HPPUT AND NCSTTP.
  105. *
  106.  #
  107. STOPIMS;
  108. #
  109.  INPUT PARAMETERS
  110. #
  111. ITEM ACBAD; # ACB ADDRESS #
  112. ITEM ACN; # APPLICATION CONNECTION NUMBER #
  113. ITEM TRIGGER; # STATE TABLE TRIGGER NUMBER #
  114. ITEM SMPTR; # ADDRESS OF SM BUFFER #
  115. ITEM TEMP; # TEMP VARIABLE #
  116. #
  117.  EXTERNAL VARIABLES
  118. #
  119. XREF
  120. BEGIN
  121. PROC HBSTTP; # HOST BLOCK PROTOCOL STATE TABLE PROC #
  122. PROC BLINK;
  123. PROC ABORT; # ABORT NIP #
  124. PROC LOCLLCB; # LOCATE LLCB #
  125. PROC NCSTTP; # NETWORK CONNECTION STATE TABLE PROC #
  126. PROC OMSG; # ISSUE DAYFILE MESSAGE #
  127. PROC OSCHAPP; # SWAPIN APPLICATION #
  128. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  129. PROC XSTTP; # STATE TABLE PROCESSOR #
  130. PROC XTRACE; # RECORD PROCEDURE CALL #
  131. PROC MGETS ;
  132. END
  133. #
  134.  INTERNAL VARIABLES
  135. #
  136.  
  137. SWITCH HCACTION HC0,HC1,HC2,HC3,HC4,HC5,HC6,HC7,HC8,HC9,
  138. HC10,HC11,HC12,HC13,HC14,HC15,HC16,HC17,
  139. HC18,,HC20,HC21,HC22,HC23,HC24,HC25
  140. ,HC26
  141. ,HC27
  142. ,HC28
  143. ;
  144.  
  145.  
  146.  
  147.  
  148. ITEM ACNTINDX; # ACNT INDEX #
  149. ITEM CRAC ; # CONNECTION NUMBER IN CR/SWH/R #
  150. ITEM AN; # APPLICATION NUMBER #
  151. ITEM NCN; # NETWORK CONNECTION NUMBER #
  152. ITEM CURST; # CURRENT STATE #
  153. ITEM LLCBAD; # LLCB ADDRESS #
  154. ITEM RESP; # RESPONSE RETURNED FROM STATE TABLE PROC #
  155. ITEM INDEX I ;
  156. ITEM OLDAN; # APPLICATION NUMBER #
  157. ITEM CURACNT U ; # CURRENT ACNT #
  158. ITEM BUFFERADR I ; # ADDRESS OF NEEDED BUFFER #
  159.  
  160. #**********************************************************************#
  161. BEGIN
  162. BEGIN
  163.  
  164. CONTROL IFEQ DEBUG,1;
  165. XTRACE("HCSTT") ;
  166. CONTROL FI;
  167.  
  168. LLCBAD = 0 ;
  169. PARAMS5 = FALSE ;
  170. PARAMS7 = 0 ;
  171. # VALIDATE TRIGGER NUMBER #
  172. IF TRIGGER LQ HCMTR AND TRIGGER GQ 0
  173. THEN
  174. BEGIN # VALID TRIGGER NUMBER #
  175. P<ACB> = ACBAD; # BASE ACB #
  176. P<ACNT> = ACBACNT[0]; # BASE ACNT #
  177. IF ACN NQ 0
  178. THEN
  179. BEGIN
  180. ACNTINDX = ACN + ACNTHSIZE - ACNTMINACN[0];
  181. P<ACNB> = ACNTACNB[ACNTINDX];
  182. P<NCNB> = ACNBNCNB[0]; # ADDRESS OF NCNB #
  183. END
  184. ELSE
  185. P<ACNB> = 0;
  186. IF P<ACNB> EQ 0
  187. THEN
  188. CURST = STATX; # CURRENT STATE #
  189. ELSE
  190. CURST = ACNTCS[ACNTINDX];
  191. XSTTP(HCORD,CURST,TRIGGER,RESP);
  192. P<STRESP> = LOC(RESP); # RESPONSE WORD #
  193. IF LEGTRIG[0]
  194. THEN
  195. BEGIN # LEGAL TRIGGER #
  196. IF ACTION[0] NQ NOCHG
  197. THEN
  198. GOTO HCACTION[ACTION[0]]; # EXECUTE PROPER ACTION #
  199. ELSE
  200. GOTO HCA;
  201.  
  202. HC0:
  203.  
  204. #
  205.   CACNBTI (ACTION NO. 0)
  206.   CREATE ACNB AND SEND CR/ITE/R TO NVF
  207. #
  208.  
  209.  
  210. PARAMP1 = SMPTR + BLKHSIZE + ABHSIZE; # FWA OF ICN/TE/R #
  211. CRACNBP ; # CALL INTERNAL PROC TO BUILD ACNB #
  212. PARAMS1 = SMPTR; # ADDRESS OF ICN/TE/R #
  213. PARAMS2 = ACN; # APPLICATION CONNECTION NUMBER #
  214. PARAMP5 = STRTCX"CRITE$" ;
  215. OVLNAME = STRTCONP; # SEND CR/ITE/R TO NVF #
  216. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  217. GOTO HCA;
  218. HC1:
  219. #
  220.   RECEIVED ICN/AP/R FROM NETWORK
  221. #
  222. PARAMP1 = SMPTR + BLKHSIZE + ABHSIZE; # FWA OF ICN/AP/R #
  223. CRACNBP ; # BUILD THE ACNB #
  224. #
  225.   AND SEND CR/RAP/R TO NVF USING THE ICN/AP/R BUFFER
  226. #
  227. PARAMS1 = SMPTR ;
  228. PARAMS2 = ACN ;
  229. PARAMS3 = P<ACNB> ;
  230. PARAMP5 = STRTCX"CRRAP$" ;
  231. OVLNAME = STRTCONP ; # OVERLAY TO SEND CR/RAP/R #
  232. OVLCALL ;
  233. GOTO HCA ;
  234. HC2:
  235. #
  236.   DLACNB (ACTION NO. 2)
  237.   SEND CON/CB/U TO APPLIACTION
  238. #
  239.  
  240. PARAMS1 = RCB"LND"; # REASON CODE 1 - NETWORK TERMINATED CON #
  241. PARAMS2 = P<ACNB>; # ACNB ADDRESS #
  242. OVLNAME = HCONCBUP; # OVERLAY NAME #
  243. PARAMS3 = 0 ;
  244. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  245. GOTO HCA;
  246. HC3:
  247. #
  248.   SEND TCH/TCHAR TO APPLICATION
  249. #
  250.  
  251. IF ACNBNCNB[0] NQ 0
  252. THEN # NCNB EXISTS #
  253. BEGIN # SEND TCH/TCHAR TO APPLICATION #
  254. PARAMS1 = P<ACNB>; # ACNB ADDRESS #
  255. OVLNAME = HTCHARP; # OVERLAY NAME #
  256. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  257. END
  258. #
  259.   UPDATE ACNB ON RECEIPT OF CR/RCN/N
  260. #
  261.  
  262. PARAMS1 = P<ACNB>; # ADDR OF APPLICATION CONNECTION BLOCK #
  263. PARAMS2 = SMPTR; # ADDR OF CR/RCN/N SM BUFFER #
  264. OVLNAME = UPACNB4P; # OVERLAY NAME #
  265. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  266. GOTO HCA;
  267. HC4:
  268. #
  269.   CRRCNCB ( ACTION NO. 4 )
  270.   COMBINED ACTION OF ACTION 5 AND ACTION 9.
  271.   SWITCH ACNB TO NVF
  272.   SEND CR/RCN/R AND CR/CB/U TO NVF
  273. #
  274.  
  275. HC5:
  276. #
  277.   SACNB2 (ACTION NO. 5)
  278.   SWITCH ACNB AND SEND CR/RCN/R TO NVF
  279. #
  280.  
  281. #
  282.   CON/REQ/A CASE
  283.   SWITCH ACNB FROM APPL TO NVF
  284. #
  285.  
  286. PARAMS1 = ACBAD; # ADDRESS OF OLD ACB #
  287. PARAMS2 = ACN; # ADDRESS OF OLD CONNECTION NUMBER #
  288. PARAMS3 = ATACBA[NVFAN]; # ADDRESS OF NEW ACB #
  289. PARAMS4 = 0; # NO NEW CONNECTION NUMBER #
  290. PARAMS8 = FALSE; # SET NOT LOANED CONNECTION SWITCH #
  291. OVLNAME = HSWACNBP; # NAME OF OVERLAY TO LOAD #
  292. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  293.  
  294. # BASE ACNT TO NVF-S NEW CONNECTION JUST SWITCHED TO #
  295.  
  296. OLDAN = ACBAN[0]; # APPLIC. NO. OF APPL REFUSING CONNECTION #
  297. P<ACNB> = PARAMS1; # ADDRESS OF NEW ACNB #
  298. PARAMS2 = 0 ; # PRESET APPL. NAME TO ZERO #
  299. IF ACNBPRID[0] NQ 0
  300. THEN
  301. BEGIN # FROM SECONDARY APPL. #
  302. IF NOT ACNBPRAF[0] # PRIM NOT FAILED YET #
  303. THEN
  304. BEGIN # PRIMARY APPL. HAS NOT GONE #
  305. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB OF PRIMARY #
  306. TEMP = P<ACNT>; # SAVE ACNT TEMPLATE #
  307. P<ACNT> = ACBACNT[0]; # PRIMARY APPL ACNT #
  308. ACNTINDX = ACNBPRACN[0] + ACNTHSIZE - ACNTMINACN[0];
  309. # GET INDEX TO ACNT #
  310. ACNTSECAN[ACNTINDX] = NVFAN; # ACNB IS NOW WITH NVF #
  311. ACNTSECACN[ACNTINDX] = ACNBACN[0]; # ACN IN NVF ACNB #
  312. P<ACNT> = TEMP; # RESTORE ACNT #
  313. PARAMS2 = ACBANAME[0] ; # PRIMARY APPL. NAME #
  314. PARAMS3 = ACNBRC[0] + CRSWHTAB;# SET REASON CODE TO RC+20B #
  315. END # PRIM HAS NOT GONE #
  316. ELSE
  317. BEGIN
  318. PARAMS3 = RCRC"PAF" ; # PRIM HAS GONE, SET RC TO 11B #
  319. ACNBPRID[0] = 0 ; # #
  320. END
  321. END # FROM SECODARY APPL. #
  322. ELSE
  323. BEGIN # NOT LOANED CONN. #
  324. PARAMS3 = ACNBRC[0] ; # SET REASON IN CR/RCN TO APL RC#
  325. END # NOT LOANED CONN. #
  326.  
  327. # ISSUE CR/CRN/R TO NVF #
  328.  
  329. P<ACB> = ATACBA[NVFAN];
  330. P<ACNT> = ACBACNT[0];
  331. ACNTINDX = ACNBACN[0] + ACNTHSIZE - ACNTMINACN[0];
  332.  
  333.  
  334. # ISSUE RECONNECT (CR/RCN/R) TO NVF #
  335.  
  336. PARAMS4 = OLDAN; # AN OF APPL REFUSING CONNECTION #
  337. OVLNAME = HCRRCNRP; # OVERLAY NAME #
  338. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  339. #
  340.   CHECK IF THIS IS THE LAST CONNECTION OF AN EX-PRU
  341.   APPLICATION. IF SO , RELEASE THE ACB OF IT
  342. #
  343. P<ACB> = ATACBA[OLDAN] ;
  344. IF ACBWOFF[0] AND ACBNPRU[0] EQ 0
  345. THEN
  346. BEGIN
  347. PARAMS1 = ACBAN[0] ;
  348. OVLNAME = RELACBP ;
  349. OVLCALL ;
  350. END
  351.  
  352. IF ACTION[0] EQ SACNB2
  353. THEN
  354.  
  355. GOTO HCA; # ACTION ACNB2 SEND CR/RCN ONLY #
  356.  
  357. # CONTINUE WITH ACTION CRRCNCB (4), SEND CR/CB/U #
  358. HC9:
  359. #
  360.   CRCBU (ACTION NO. 9)
  361.   SEND CR/CB/U TO NVF
  362. #
  363. PARAMS2 = P<ACNB>; # ACNB ADDRESS #
  364. OVLNAME = HCRCBUP; # OVERLAY NAME #
  365. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  366. #
  367.   SEND CON/CB TO PRIMARY APPLICATION IF THERE IS ONE
  368. #
  369. PARAMS1 = RCB"LND"; # REASON CODE 1 - NETWORK TERMINATED CON #
  370. OVLNAME = HCONCBUP; # NAME OF OVERLAY TO LOAD #
  371. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  372. GOTO HCA;
  373.  
  374. HC6:
  375. #
  376.   CHTCCA (ACTION NO. 6)
  377.   SEND TCH/TCHAR TO APPLICATION
  378. #
  379.  
  380. IF ACNBNCNB[0] NQ 0
  381. THEN # NCNB EXISTS #
  382. BEGIN # SEND TCH/TCHAR TO APPLICATION #
  383. PARAMS1 = P<ACNB>; # ACNB ADDRESS #
  384. OVLNAME = HTCHARP; # OVERLAY NAME #
  385. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  386. GOTO HCA;
  387. END
  388. ELSE # NO NCNB EXISTS #
  389. GOTO HC77;
  390. HC7:
  391. GOTO HCA;
  392. HC8:
  393. #
  394.   UACNB1 (ACTION NO. 8)
  395.   UPDATE ACNB
  396. #
  397. PARAMS1 = P<ACNB>; # ADDR OF APPL CONNECTION BLOCK #
  398. PARAMS2 = SMPTR; # ADDR OF SM BUFFER #
  399. PARAMS9 = COMPCX"UACNB$" ;
  400. OVLNAME = COMPCONP; # OVERLAY NAME #
  401. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  402. GOTO HCA;
  403. HC10:
  404. #
  405.   UACNB2 (ACTION NO. 10)
  406.   UPDATE ACNB WITH INFORMATION FROM CON/REQ/N
  407.   SEND CR/ACC/U TO NVF
  408.   SEND TCH/TCHAR TO APPLICATION
  409. #
  410.  
  411. PARAMS1 = P<ACNB>; # ADDR OF APPL CONNECTION BLOCK #
  412. PARAMS2 = SMPTR; # ADDR OF CON/REQ/N SM BUFFER #
  413. PARAMS9 = SENDX"UACNB3$" ;
  414. OVLNAME = SENDACCP; # OVERLAY NAME #
  415. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  416.  
  417. # SEND CR/ACC/U TO NVF #
  418. PARAMS1 = P<ACNB>;
  419. PARAMS9 = SENDX"CRACC$" ;
  420. OVLNAME = SENDACCP; # OVERLAY NAME #
  421. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  422.  
  423. # SEND TCH/TCHAR TO APPLICATION #
  424. PARAMS1 = P<ACNB>;
  425. IF ACNBNCNB[0] NQ 0
  426. THEN # NCNB EXISTS #
  427. BEGIN # SEND TCH/TCHAR TO APPLICATION #
  428. PARAMS1 = P<ACNB>; # ACNB ADDRESS #
  429. OVLNAME = HTCHARP; # OVERLAY NAME #
  430. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  431. END
  432. GOTO HCA;
  433. HC11:
  434. #
  435.  
  436.   RECEIVED CR/IAP/N FROM NVF
  437.  
  438.   - VLLCB - VALIDATE LOGICAL LINK (FOR A-A CONNECTIONS)
  439.   - IF EXIST CHOOSE A PROPER CONNECTION NUMBER TO USE WITH IT
  440. #
  441. PARAMP1 = SMPTR ; # CR/IAP/N FROM NVF #
  442. PARAMP2 = P<ACNB> ; # CONNECTION BLOCK INFO #
  443. # #
  444. OVLNAME = HVLLCBP ;
  445. OVLCALL ; # CALL OVERLAY AND EXECUTE #
  446. # #
  447. IF PARAMP3 EQ 0 # NO LOGICAL LINK. WE SENT ANOTHER CR/IAP #
  448. THEN
  449. RETURN;
  450. ELSE
  451. BEGIN
  452. LLCBAD = PARAMP3 ; # LOGICAL LINK FOR THAT A-A CONNECTION #
  453. NCN = PARAMP4 ; # CONNECTION NUMBER ON THIS LOGICAL LINK #
  454. ACNBADD = P<ACNB> ;
  455. P<SMNVF> = SMPTR + BLKHSIZE + ABHSIZE ;
  456. P<SMNIP> = P<SMNVF>;
  457. CRBYTE = CRIOCTN[0]; # SAVE BYTE COUNT IN POINTER TABLE #
  458. ICNCN[0] = NCN; # MADE NCN AVAILABLE TO BLDNCNB #
  459. ACNBABL[0] = CRIAABL[0] ;
  460. ACNBVCBO[0] = CRVCB[0] ;
  461. ACNBICT [0] = CRICT[0] ;
  462. ACNBALN[0] = CRALN[0]; # APPLICATION LIST NUMBER #
  463. IF CRASNOD[0] EQ 0 AND CRADNOD[0] EQ 0
  464. THEN
  465. ACNBDT[0] = DT$INTA ;
  466. ELSE
  467. ACNBDT[0] = DT$INTE ;
  468. END
  469. # #
  470. GOTO HCA ;
  471. HC12:
  472. #
  473.   RECEIVED CR/IAP/A FROM NVF
  474.   SEND CON/ACRQ/A TO APPL WITH RC FROM CR/IAP/A
  475. #
  476. P<SMNVF> = SMPTR + BLKHSIZE + ABHSIZE ;
  477. IF CRRIAP[0] NQ RCIA"APF"
  478. THEN # APPLICATION HAS NOT FAILED #
  479. BEGIN
  480. P<ACB> = ATACBA[ACNBIAN[0]]; # ADR OF ACB TO QUEUE CON/ACRQ/A#
  481. IF ACBERCNT[0] LS MAXLGERR
  482. THEN # OKAY TO GENERATE CON/ACRQ/A #
  483. BEGIN
  484. PARAMS1 = CRRIAP[0]; # REASON CODE FROM CR/IAP/A #
  485. PARAMS2 = P<ACNB>; # ADDRESS OF ACNB FOR CONNECTION#
  486. OVLNAME = HCACRQAP; # NAME OF OVERLAY TO LOAD #
  487. OVLCALL; # LAOD AND EXECUTE OVERLAY #
  488. END
  489. ELSE # REACHED MAX NO OF ERR SUP MSG #
  490. BEGIN
  491. IF ACBERCNT[0] EQ MAXLGERR
  492. THEN # REACHED MAX NO OF ERR SUP MSG #
  493. BEGIN
  494. PARAMS1 = RLG"IAL"; # ERR/LGL RC FOR TOO MANY ERRORS#
  495. OVLNAME = HLGLERRP; # NAME OF OVERLAY TO LOAD #
  496. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  497. END
  498. END
  499. END
  500. GOTO HCA ;
  501. HC13:
  502. #
  503.   SACNB1 (ACTION NO.13)
  504.   SWITCH ACNB - SEND CR/SWH/N AND CON/REQ/R
  505. #
  506.  
  507. # CR/SWH/R CASE #
  508.  
  509. P<SMNVF> = SMPTR + BLKHSIZE + ABHSIZE; # FWA OF CR/SWH/R TEXT #
  510. CRAC = CRSWAN[0] ;
  511. P<ACB> = ATACBA[CRAC] ; # ACB OF APPL TO BE SWITCHED TO #
  512.  
  513. # SEND CR/SWH/N TO NVF #
  514.  
  515. PARAMS1 = SMPTR; # SM BUFFER - CR/SWH/R #
  516. PARAMS2 = P<ACNB> ;
  517. PARAMS9 = STRTSX"CRSWH$" ;
  518. OVLNAME = STRTSWP; # OVERLAY NAME #
  519. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  520.  
  521. IF P<ACB> NQ 0 AND NOT ATNVFN[CRAC] AND NOT ATNVFF[CRAC]
  522. THEN
  523. BEGIN # APPL TO SWITCH TO IS NETTED ON #
  524. # SWITCH ACNB FROM NVF TO NEW APPL #
  525. PARAMS4 = 0; # INITIALIZE FOR NOT RETURNING LOAND CN#
  526. IF ACNBPRID[0] NQ 0
  527. THEN
  528. BEGIN # IT IS LOANED CONN. #
  529. IF CRSWLST[0] GQ CRSWHSPR
  530. THEN
  531. BEGIN # RETURN TO PRIMARY APPL. #
  532. IF ACNBPRAF[0]
  533. THEN
  534. BEGIN # REAL PRIMARY HAS NETTED OFF BUT #
  535. PARAMS2 = 0 ; # ANOTHER APPLICATION HAS NETTED ON #
  536. PARAMS3 = RCRC"PAF" ; # WITH THE SAME AN #
  537. ACNBPRID[0] = 0 ; # CLEAR BECAUSE NO LONGER A LOAN CON#
  538. GOTO SENDCRN ; # RECONNECTION CONN. TO NVF WITH RC #
  539. END # 11B #
  540. ELSE
  541. BEGIN # REAL PRIMARY HAS NOT FAILED OR #
  542. PARAMS4 = ACNBPRACN[0]; # NETTED OFF. USE THE SAME ACN #
  543.  
  544. # ZERO OUT THE SECONDARY ID IN ACNT ENTRY OF CONN #
  545. # CONNECTED TO PRIMARY APPLICATION. #
  546.  
  547. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB OF PRIMARY #
  548. P<ACNT> = ACBACNT[0] ;
  549. INDEX = ACNBPRACN[0] + ACNTHSIZE - ACNTMINACN[0] ;
  550. ACNTSECID[INDEX] = 0 ;
  551. P<ACB> = ATACBA[CRAC] ; # RESET ACB ADDRESS #
  552. ACNBPRID[0] = 0 ; # CLEAR BECAUSE IT NO LONGER A LOANE#
  553. END # CONNECTION #
  554. END
  555. END # IT IS A LOANED CONN #
  556. PARAMS1 = ACBAD; # ADDRESS OF OLD ACB #
  557. PARAMS2 = ACN; # ADDRESS OF OLD CONNECTION NUMBER #
  558. PARAMS3 = P<ACB>; # ADDRESS OF NEW ACB #
  559. PARAMS8 = FALSE; # SET NOT LOANED CONNECTION SWITCH #
  560. OVLNAME = HSWACNBP; # NAME OF OVERLAY TO LOAD #
  561. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  562. IF PARAMS1 EQ 0 # NO NEW ACNB WAS ASSIGNED #
  563. THEN
  564. BEGIN # CAN NOT ASSIGN NEW CONN. #
  565.  
  566. PARAMS2 = 0 ; # PRESET TO ZERO #
  567. IF ACNBPRID[0] NQ 0
  568. THEN
  569. BEGIN # SWITCH FROM SECONDARY APPL. #
  570. IF NOT ACNBPRAF[0]
  571. THEN
  572. BEGIN # PRIMARY APPL. NOT GONE YET #
  573. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB OF PRIMARY #
  574.  
  575. # ZERO OUT THE SECONDARY ID IN ACNT ENTRY OF CONN #
  576. # CONNECTED TO PRIMARY APPLICATION. #
  577.  
  578. CURACNT = P<ACNT> ;
  579. P<ACNT> = ACBACNT[0] ;
  580. INDEX = ACNBPRACN[0] + ACNTHSIZE - ACNTMINACN[0] ;
  581. ACNTSECID[INDEX] = 0 ;
  582.  
  583. P<ACNT> = CURACNT; # RESET ACNT ADDRESS #
  584.  
  585. PARAMS2 = ACBANAME[0] ; # SET APPL NAME IN CR TO PRIM #
  586. PARAMS3 = RCRC"SRC" ; # REASON CODE IN CR/RCN = 25B #
  587. END # PRIMARY HAS NOT GONE #
  588. ELSE
  589. BEGIN
  590. PARAMS3 = RCRC"PAF" ; # PRIM IS GONE, REASON CODE IS 9#
  591. ACNBPRID[0] = 0 ; # #
  592. END
  593.  
  594.  
  595. END # SWITCH FROM SECOND APPL. #
  596. ELSE
  597. PARAMS3 = RCRC"ARC" ;
  598. GOTO SENDCRN ; # SEND CR/CRN/R TO NVF #
  599. END # CONN. CAN NOT BE ASSIGNED #
  600. ELSE
  601. BEGIN # NEW CONN. ASSIGNED #
  602. P<ACNB> = PARAMS1; # ADDRESS OF NEW ACNB #
  603. IF CRSWLST[0] EQ CRSWHSOK
  604. THEN
  605. BEGIN # SWITCHING FROM PRIM TO SECOND #
  606. IF NOT ACNBPRAF[0] # PRIMARY NOT FAILED #
  607. THEN
  608. BEGIN
  609. OLDAN = ACBAN[0] ; # AN OF SECONDARY #
  610. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB OF PRIMARY #
  611. P<ACNT> = ACBACNT[0] ; # UPDATE SECID FIELD IN ACNT #
  612. ACNTINDX = ACNBPRACN[0] + ACNTHSIZE - ACNTMINACN[0] ;# OF#
  613. ACNTSECAN[ACNTINDX] = OLDAN ; # PRIMARY APPLICATION #
  614. ACNTSECACN[ACNTINDX] = ACNBACN[0] ;
  615. END
  616. P<ACB> = ATACBA[CRAC] ; # SET TEMPLATE BACK TO SECODARY #
  617. END
  618.  
  619. # SEND CON/REQ/R TO APPLCATION #
  620.  
  621. PARAMS1 = SMPTR; # ADDR OF CR/SWH/R BUFFER #
  622. PARAMS2 = P<ACNB>; # ACNB OF NEW CONN (NVF-S ACNB) #
  623. PARAMS9 = STRTSX"CONREQ$" ;
  624. OVLNAME = STRTSWP; # OVERLAY NAME #
  625. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  626. # BASE ACNT TO NEW APPLICATION-S ACNT #
  627. P<ACNT> = ACBACNT[0];
  628. ACNTINDX = ACNBACN[0] + ACNTHSIZE - ACNTMINACN[0];
  629. END
  630. END
  631. ELSE
  632. BEGIN # APPL SWITCHING TO FAILED OR NETTED OFF #
  633. # SEND RECONNECT (CR/RCN/R) TO NVF #
  634. PARAMS2 = 0 ; # PRESET TO ZERO #
  635. IF ACNBPRID[0] NQ 0
  636. THEN
  637. BEGIN # FROM SECONDARY APPL #
  638. IF NOT ACNBPRAF[0]
  639. THEN
  640. BEGIN # PRIMARY NOT GONE YET #
  641. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB OF PRIMARY #
  642.  
  643. # ZERO OUT THE SECONDARY ID IN ACNT ENTRY OF CONN #
  644. # CONNECTED TO PRIMARY APPLICATION. #
  645.  
  646. CURACNT = P<ACNT> ;
  647. P<ACNT> = ACBACNT[0] ;
  648. INDEX = ACNBPRACN[0] + ACNTHSIZE - ACNTMINACN[0] ;
  649. ACNTSECID[INDEX] = 0 ;
  650. P<ACNT> = CURACNT ; # RESET ACNT ADDRESS #
  651.  
  652. PARAMS2 = ACBANAME[0] ; # PRIM APPL. NAME #
  653. PARAMS3 = RCRC"SNA" ; # REASON ON CR/CRN/R = 26B #
  654. END
  655. ELSE
  656. BEGIN
  657. PARAMS3 = RCRC"PAF" ; # RC = 11B #
  658. ACNBPRID[0] = 0 ; # #
  659.  
  660. END
  661.  
  662. END
  663. ELSE
  664. PARAMS3 = RCRC"ANF" ;
  665.  
  666. SENDCRN:
  667. PARAMS1 = P<ACNB> ;
  668. PARAMS4 = CRSWAN[0]; # AN OF APPL WHICH FAILED OR NETTED OFF #
  669. OVLNAME = HCRRCNRP; # OVERLAY NAME #
  670. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  671.  
  672. # CHANGE STATE TO 6 #
  673. NEWSTATE[0] = HCRCNVF; # RECONNECT TO NVF INITIATED #
  674. END
  675. GOTO HCA;
  676.  
  677. HC14:
  678. #
  679.   DLACNB5 (ACTION NO. 14)
  680.   RECEIPT OF CR/TRM/R FROM NVF
  681.   SEND CR/TRM/N AND CON/CB/U
  682. #
  683.  
  684. # SEND CR/TRM/N TO NVF #
  685.  
  686. PARAMS1 = SMPTR;
  687. P<SUPMSG> = SMPTR + AIPHSIZE + ABHSIZE; # FWA OF CR/TRM/R #
  688. RCBRK = CRRTRM[0]; # SAVE REASON CODE FOR BRK #
  689. OVLNAME = HCRTRMNP; # OVERLAY NAME #
  690. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  691. # SEND CON/CB/U TO APPLICATION #
  692. PARAMS1 = RCBRK; # REASON CODE FROM CR/TRM/R #
  693. PARAMS2 = P<ACNB>; # ACNB ADDRESS OF CONN TO TERMINATE #
  694. OVLNAME = HCONCBUP; # OVERLAY NAME #
  695. PARAMS3 = 0 ;
  696. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  697. GOTO HCA;
  698. HC15:
  699. #
  700.   CRTRMN1 (ACTION NO. 15)
  701.   RECEIPT OF CR/TRM/R FROM NVF
  702.   SEND CR/TRM/N TO NVF
  703.   (SEND CON/ACRQ/A TO APPL)
  704. #
  705.  
  706. P<SMNVF> = SMPTR + AIPHSIZE + ABHSIZE;
  707. RCBRK = CRRTRM[0]; # REASON FOR BRK #
  708. PARAMS1 = SMPTR;
  709. OVLNAME = HCRTRMNP;
  710. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  711.  
  712. #
  713.   SEND CON/ACRQ/A TO APPL
  714. #
  715. IF ACNBBS[0] EQ (ACNBSIZE+ACNBAPEN) # A-A CONNECTION ACNB #
  716. THEN
  717. BEGIN
  718. P<ACB> = ATACBA[ACNBIAN[0]] ;
  719. IF P<ACB> NQ 0
  720. THEN
  721. BEGIN # ACB STILL THERE #
  722. IF ACBERCNT[0] LS MAXLGERR
  723. THEN # OKAY TO GENERATE CON/ACRQ/A #
  724. BEGIN
  725. PARAMS1 = RCBRK; # REASON CODE FOR TERMINATION #
  726. PARAMS2 = P<ACNB>; # ADDRESS OF ACNB FOR CONNECTION#
  727. OVLNAME = HCACRQAP; # NAME OF OVERLAY TO LOAD #
  728. OVLCALL; # LAOD AND EXECUTE OVERLAY #
  729. END
  730. ELSE # REACHED MAX NO OF ERR SUP MSG #
  731. BEGIN
  732. IF ACBERCNT[0] EQ MAXLGERR
  733. THEN # REACHED MAX NO OF ERR SUP MSG #
  734. BEGIN
  735. PARAMS1 = RLG"IAL"; # ERR/LGL RC FOR TOO MANY ERRORS#
  736. OVLNAME = HLGLERRP; # NAME OF OVERLAY TO LOAD #
  737. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  738. END
  739. END
  740. END # ACB STILL THERE #
  741. END
  742. GOTO HCA;
  743. HC16:
  744. #
  745.   CRTRMN2 (ACTION NO. 16)
  746.   RECEIPT OF CR/TRM/R FROM NVF
  747.   SEND CR/TRM/N TO NVF
  748. #
  749. P<SMNVF> = SMPTR + AIPHSIZE + ABHSIZE;
  750. RCBRK = CRRTRM[0]; # REASON FOR BRK #
  751. PARAMS1 = SMPTR;
  752. OVLNAME = HCRTRMNP;
  753. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  754. GOTO HCA;
  755. HC17:
  756. #
  757.   RECEIVED CON/ACRQ/SM FROM APPLICATION
  758. #
  759. PARAMP1 = 0 ; # NO MESSAGE YET FROM NETWORK SIDE #
  760. CRACNBP ; # CALL INTERNAL PROC TO BUILD ACNB #
  761. P<AHEADER> = SMPTR + BLKHSIZE; # BASE APPLICATION HEADER #
  762. ACNBABN[0] = ABHABN[0]; # APPLICATION BLOCK NUMBER #
  763. #
  764.   AND SEND CR/IAP/R TO NVF
  765. #
  766. PARAMS1 = 0 ; # INDICATE FIRST CALL #
  767. PARAMS2 = ACN ;
  768. P<SUPMSG> = SMPTR+AIPHSIZE+ABHSIZE;
  769. ACNBANM[0] = CONANM[0] ; # STORE REQUESTED APPLICATION NAME #
  770. ACNBHID[0] = CONHID [0] ; # STORE HOST ID #
  771. ACNBIAN[0] = ACBAN[0] ;
  772. ACNBLID[0] = CONULID[0] ;
  773. PARAMS3 = ACNBIAN[0] ;
  774. PARAMS4 = P<ACNB> ; # SO THAT OVERLAY CAN RETRIEVE VALUES #
  775. PARAMS7 = P<AHEADER>; # PASS CONACRQ HEADER ADDRESS #
  776. OVLNAME = HCRIAPRP; # SEND CR/IAP/R TO NVF #
  777. OVLCALL ;
  778. GOTO HCA;
  779. HC18:
  780. #
  781.   UACNB3 (ACTION NO. 18)
  782.   UPDATE ACNB AND SEND CR/ACC/U TO NVF
  783. #
  784.  
  785. PARAMS1 = P<ACNB>; # ADDR OF APPL CONNECTION BLOCK #
  786. PARAMS2 = SMPTR; # ADDR OF CON/REQ/N SM BUFFER #
  787. PARAMS3 = 0;
  788. PARAMS9 = SENDX"UACNB3$" ;
  789. OVLNAME = SENDACCP; # OVERLAY NAME #
  790. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  791. # SEND CR/ACC/U #
  792. PARAMS1 = P<ACNB>;
  793. PARAMS9 = SENDX"CRACC$";
  794. OVLNAME = SENDACCP; # OVERLAY NAME #
  795. OVLCALL;
  796. IF PARAMS3 NQ 0
  797. THEN
  798. BEGIN # BAD INPUT CHAR TYPE-BREAK CONNECTIONS
  799.   AND RECONNECT TO NVF #
  800. TRIGB[0] = NOCHG;
  801. PARAMS1 = PARAMS3; # REASON CODE FOR CON/CB #
  802. PARAMS2 = P<ACNB>; # ACNB OF CONN TO BREAK #
  803. OVLNAME = HCONCBUP; # OVERLAY NAME #
  804. PARAMS3 = 0 ;
  805. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  806. END
  807. GOTO HCA;
  808. HC20:
  809. #
  810.   SFCINAC ( ACTION NO. 20 )
  811.   SEND FC/INACT/SM TO APPLICATION
  812. #
  813.  
  814. PARAMS1 = P<ACB>; # ADDRESS OF ACB #
  815. PARAMS2 = ACNBACN[0]; # APPLICATION CONNECTION NUMBER #
  816. OVLNAME = HSFCINAP; # NAME OF OVERLAY TO LOAD #
  817. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  818.  
  819. GOTO HCA;
  820. HC21:
  821. #
  822.   SACNB3 (ACTION NO. 21)
  823.   SWITCH ACNB - SEND CR/RCN/R AND CON/END/N
  824. #
  825.  
  826. # CON/END/R CASE
  827.   SWITCH ACNB FROM APPL TO NVF
  828. #
  829.  
  830. P<SUPMSG> = SMPTR + BLKHSIZE + ABHSIZE; # FWA OF CON/END/R #
  831. # FLAG TO RELACNB NOT TO FREE THE #
  832. # ACNT ENTRY ASSO. WITH THIS ACNB #
  833. PARAMS1 = ACBAD; # ADDRESS OF OLD ACB #
  834. PARAMS2 = ACN; # ADDRESS OF OLD CONNECTION NUMBER #
  835. PARAMS3 = ATACBA[NVFAN]; # ADDRESS OF NEW ACB #
  836. PARAMS4 = 0; # NOT RETURNING LOANED CON TO PRI APP #
  837. PARAMS8 = CONLOAN[0]; # LOAN CONNECTION FLAG #
  838. OVLNAME = HSWACNBP; # NAME OF OVERLAY TO LOAD #
  839. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  840.  
  841. # BASE ACNT TO NVF-S NEW CONNECTION JUST SWITCHED TO #
  842.  
  843. OLDAN = ACBAN[0]; # APPLIC. NO. OF APPL ENDING CONNECTION #
  844.  
  845.  
  846. P<ACNB> = PARAMS1; # ADDRESS OF NEW ACNB #
  847. PARAMS7 = SMPTR ;
  848. PARAMS5 = FALSE ; # CLEAR LOAN BIT FOR CON/END/N #
  849. PARAMS8 = FALSE ; # ASSUMING LENDING IS O.K. #
  850. IF ACNBPRID[0] NQ 0
  851. THEN
  852. BEGIN # SEC. APPL. SEND CON/END/R ON LOANED CON#
  853. IF CONLOAN[0]
  854. THEN
  855. BEGIN # LENDING IS NOT O.K. #
  856. RC[0] = 1 ; # SET REASON CODE IN CON/END/N FOR #
  857. PARAMS8 = TRUE ;
  858. END
  859.  
  860. # NO FORWARDING INDICATION, CONNECTION NOW #
  861. # SWITCHED BACK TO PRIMARY APPLICATION #
  862. IF CONANM[0] EQ "ABORT"
  863. THEN
  864. BEGIN # SEC. APPL. ABORTED CON #
  865. PARAMS1 = RCB"LCA" ; # REASON OF ABORTTING ON #
  866. PARAMS2 = P<ACNB> ; # CON/CB/R TO PRIMARY APPL.#
  867. OVLNAME = HCONCBUP ;
  868. OVLCALL ;
  869. PARAMS1 = P<ACNB>; # PASS ACNB ADDR TO SEC OVERLAY #
  870. PARAMS3 = RCRC"SAC" ; # RC = 12B REASON CODE OF CR/RCN/R #
  871. PARAMS2 = 0 ; # NO APPL. NAME IN CR/RCN #
  872. END # SEC. APPL. ABORTED CON #
  873. ELSE
  874. BEGIN # SEC APPL. PASSES CON TO #
  875. # ANOTHER APPL. #
  876. IF NOT ACNBPRAF[0]
  877. THEN
  878. BEGIN # PRI. APPL. NOT ABORTED #
  879. # RECON TO PRIMARY APPL. #
  880. PARAMS3 = RCRC"STC" ; # RC = 24B REASON CODE OF CR/CRN #
  881. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB OF PRIM. APPL. #
  882. PARAMS2 = ACBANAME[0] ; # NAME OF PRIMARY APPL. #
  883. END
  884. ELSE
  885. BEGIN # PRIM APPL. HAS ABORTED #
  886. PARAMS3 = RCRC"PAF" ; # RC = 11B REASON CODE ON CR/CRN #
  887. PARAMS2 = 0 ; # NO APPL. NAME #
  888. ACNBPRID[0] = 0 ;
  889. END
  890. END # SEC. APPL. PASSED CON #
  891.  
  892. END # SEC. APPL. SENDS CON/END ON LOANED CON #
  893. ELSE
  894. BEGIN # CON/END/R FROM PRIM. APPL. #
  895. PARAMS2 = CONUANM[0] ; # NEXT APPLICATION NAME #
  896. IF CONLOAN[0]
  897. THEN
  898. BEGIN # LOAN BIT IS ON #
  899. P<NCNB> = ACNBNCNB[0] ;
  900. IF P<NCNB> NQ 0
  901. AND ( NCNBDT[0] EQ DT$INTA # INTRA-HOST CONNECTN #
  902. OR NCNBDT[0] EQ DT$INTE ) # INTER-HOST #
  903. THEN
  904. BEGIN # DO NOT LOAN THIS CONNECTION, TERMI#
  905. RC[0] = 02 ; # NATE CONN. AND SEND CON/END/N WITH#
  906. # REASON CODE 2 #
  907. PARAMS3 = RCRC"ATC" ; # NORMAL TERMINATION REASON CODE #
  908. PARAMS2 = 0 ; # CLEAR NEXT APPLICATION NAME #
  909. PARAMS8 = TRUE ; # LENDING NOT O.K., FOR CON/END/N #
  910. END
  911. ELSE
  912. BEGIN # PRIM. APPL. TRYING TO LOAN CON TO SEC. APL#
  913. ACNBPRAN[0] = OLDAN ; # SAVE OLD APPL. NUM. #
  914. ACNBPRACN[0] = ACN ; # SAVE OLD ACN IN SEC ACN#
  915. ACNTWD[ACNTINDX] = 0 ; # CLEAR UP THE ENTRY #
  916. ACNTSECAN[ACNTINDX] = NVFAN ; # NVF 'S AN #
  917. ACNTSECACN[ACNTINDX] = ACNBACN[0];# ACN OF THIS CON IN NVF #
  918. PARAMS3 = RCRC"LSA" ; # RC = 10B REASON CODE TO NVF FOR #
  919. PARAMS5 = TRUE ; # SET LOAN BIT INDICATOR FOR #
  920. # CON/END/N PROCESSOR #
  921. # LOANED CONNECTION #
  922. END
  923. END # LOAN BIT IS ON #
  924. ELSE
  925. PARAMS3 = RCRC"ATC" ; # NORMAL RECONNECT #
  926.  
  927. END # CON/END/R FROM PRIM. APPL. #
  928.  
  929.  
  930. P<ACB> = ATACBA[NVFAN] ; # SET BASE TO NVF 'S #
  931. P<ACNT> = ACBACNT[0] ;
  932. ACNTINDX = ACNBACN[0] + ACNTHSIZE - ACNTMINACN[0] ;
  933. # SEND CR/RCN/R TO NVF #
  934.  
  935. PARAMS4 = OLDAN; # AN OF APPL ENDING CONNECTION #
  936. OVLNAME = HCRRCNRP; # OVERLAY NAME #
  937. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  938.  
  939. # SEND CON/END/N TO APPLICATION #
  940. PARAMS1 = SMPTR; # SM BUFFER (CON/END/R) #
  941. PARAMS2 = OLDAN; # AN OF APPL ENDING CONNECTION #
  942. OVLNAME = HCONENDP; # OVERLAY NAME #
  943. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  944. GOTO HCA;
  945. HC27:
  946.  
  947. #
  948.   UCRCBU ( ACTION 27 )
  949.   SENDING CR/BU/U TO NVF ONLY
  950. #
  951.  
  952.  
  953. HC22:
  954. #
  955.   GOCRCNE ( ACTION NUMBER 22 )
  956.   SEND CR/CB/U TO NVF
  957.   AND CON/END/N TO APPLICATION (BY ACTION 26)
  958. #
  959. PARAMS2 = P<ACNB> ;
  960. OVLNAME = HCRCBUP ;
  961. OVLCALL ;
  962.  
  963. IF ACTION[0] EQ UCRCBU
  964. THEN
  965. GOTO HCA ; # SENDING CR/CB/U ONLY #
  966.  
  967. # CONTINUE ACTION 26 TO SEND CON/END/N #
  968.  
  969. HC26:
  970. #
  971.   NCONEND (ACTION NO. 22)
  972.   SEND CON/END/N TO APPLICATION
  973. #
  974.  
  975. PARAMS1 = SMPTR; # SM BUFFER (CON/END/R) #
  976. PARAMS2 = ACBAN[0];
  977. PARAMS5 = FALSE ; # NO LOANED FLAG ON #
  978. OVLNAME = HCONENDP; # OVERLAY NAME #
  979. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  980. # NO LONGER PART OF NWL #
  981. GOTO HCA;
  982. HC23:
  983. #
  984.   UPACNB4 (ACTION NO. 23)
  985.   UPDATE ACNB ON RECEIPT OF CR/RCN/N
  986. #
  987.  
  988. PARAMS1 = P<ACNB>; # ADDR OF APPLICATION CONNECTION BLOCK #
  989. PARAMS2 = SMPTR; # ADDR OF CR/RCN/N SM BUFFER #
  990. OVLNAME = UPACNB4P; # OVERLAY NAME #
  991. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  992. GOTO HCA;
  993. HC24:
  994. #
  995.   ACTION 24 - SEND CR/IAP/R TO NVF WITH RC FROM ICN/AP/A
  996. #
  997. P<SMNIP> = SMPTR + ABHSIZE + BLKHSIZE; # GET THE ICN/AP/A #
  998. PARAMS1 = ICNRAP[0] ; # GET THE REASON CODE #
  999. PARAMS2 = ACN ;
  1000. PARAMS3 = 0 ; # THIS IS NOT THE FIRST CALL #
  1001. PARAMS4 = P<ACNB> ;
  1002. PARAMS7 = 0; # NO OLD AHEADER NEEDED #
  1003. OVLNAME = HCRIAPRP ; # SEND CR/IAP/R TO NVF #
  1004. OVLCALL ;
  1005. GOTO HCA ;
  1006.  
  1007. HC25:
  1008. #
  1009.   ACTION 25 : CHANGE PWL HEADER TO APPL. BLOCK HEADER
  1010.   THEN LINK TO APPROPPRIATE ACB.
  1011. #
  1012. MGETS(BLKHSIZE+ABHSIZE+LXFTN,BUFFERADR,TRUE);# GET BUFFER TO HOLD#
  1013. # IFT OR OFT/OFF/N#
  1014. P<PWLHDR> = SMPTR ;
  1015. P<AHEADER> = BUFFERADR + BLKHSIZE ;
  1016. ABHWORD[0] = 0 ;
  1017. ABHABT[0] = APPCMD ;
  1018. ABHACT[0] = CT60TRANS ;
  1019. ABHTLC[0] = LXFTN ;
  1020. P<SUPMSG> = BUFFERADR + BLKHSIZE + ABHSIZE ;
  1021. SPACN[0] = ACN ; # SEND AS ASYN SM #
  1022. IF PWLRC[0] EQ OFTRC
  1023. THEN
  1024. PFCSFC[0] = OFTOFFN ;
  1025. IF PWLRC[0] EQ IFTRC
  1026. THEN
  1027. PFCSFC[0] = IFTOFFN ;
  1028.  
  1029. BLINK(BUFFERADR,P<ACB>) ;
  1030. OSCHAPP(P<ACB>); # SWAP IN APPLICATION #
  1031. GOTO HCA;
  1032.  
  1033. HC28:
  1034.  
  1035. IF ACNBPRID[0] NQ 0
  1036. THEN
  1037. BEGIN # CR/RCN/A RECEIVED ON LOANED CN#
  1038. PARAMS1 = P<ACNB> ;
  1039. IF NOT ACNBPRAF[0]
  1040. THEN
  1041. BEGIN # PRIM APPL. HAS NOT GONE #
  1042. P<ACB> = ATACBA[ACNBPRAN[0]] ; # ACB IF PRIMARY APPL. #
  1043. PARAMS4 = ACBAN[0] ; # APPLICATION TO RECONN TO #
  1044.  
  1045. CURACNT = P<ACNT> ;
  1046. P<ACNT> = ACBACNT[0] ;
  1047. INDEX = ACNBPRACN[0] + ACNTHSIZE - ACNTMINACN[0] ;
  1048. ACNTSECID[INDEX] = 0 ;
  1049. P<ACNT> = CURACNT ; # RESET ACNT ADDRESS #
  1050. P<SMNVF> = SMPTR + BLKHSIZE + ABHSIZE ; # CR/RCN/A MESSAGE #
  1051. PARAMS2 = ACBANAME[0] ; # SO, SWITCH CON BACK TO PRI APP#
  1052. PARAMS3 = CRRRCN[0] ; # BY SENDING CR/RCN/R TO NVF #
  1053. # WITH REASON FROM CR/RCN/A #
  1054. END # PRIM HAS NOT GONE #
  1055. ELSE
  1056. BEGIN # PRIM APPL. HAS NETOFFED/FAILED#
  1057. PARAMS2 = 0 ; # NULL APPLICATION'S NAME #
  1058. PARAMS3 = RCRC"PAF" ;# RC = 11B REASON CODE OF CR/RCN/R IS 11B#
  1059. PARAMS4 = ACBAN[0] ;
  1060. ACNBPRID[0] = 0 ; # #
  1061. END
  1062.  
  1063. OVLNAME = HCRRCNRP ; # SEND CR/RCN/R TO NVF #
  1064. OVLCALL ;
  1065.  
  1066. END # CR/RCN/A RECEIVED ON LOANED CN#
  1067. ELSE
  1068. ABORT(DFMSG30,0) ; # ABORT NIP, BECAUSE OF NVF ERR #
  1069. HCA:
  1070.  
  1071. IF NEWSTATE[0] NQ STATX
  1072. THEN
  1073. BEGIN
  1074. ACNTCOS[ACNTINDX] = CURST; # OLD CONNECTION STATE #
  1075. ACNTCTR[ACNTINDX] = TRIGGER; # OLD CONNECTION TRIGGER #
  1076. IF NEWSTATE[0] NQ NOCHG
  1077. THEN
  1078. ACNTCS[ACNTINDX] = NEWSTATE[0]; # UPDATE NEW STATE #
  1079. END
  1080.  
  1081. IF TRIGC[0] NQ NOCHG
  1082. THEN # TRIGGER CONNECTION STATE TABLE #
  1083.  
  1084. BEGIN
  1085. IF LLCBAD EQ 0
  1086. THEN
  1087. BEGIN # THIS IS NOT AN A-A CASE WITH LL PRE-ALLOCATED#
  1088. P<NCNB> = ACNBNCNB[0];
  1089. NCN = NCNBCN[0] ; # NETWORK CONNECTION NUMBER #
  1090. CONTROL IFEQ DEBUG,1;
  1091. IF P<NCNB> EQ 0
  1092. THEN # VALID CHECK FOR T-A ONLY #
  1093. BEGIN
  1094. D27M2[0] = "HCSTTP1";
  1095. ABORT(DFMSG27,0);
  1096. END
  1097. CONTROL FI;
  1098. LOCLLCB(NCNBHN[0],NCNBTN[0],LLCBAD);
  1099. CONTROL IFEQ DEBUG,1;
  1100. IF LLCBAD EQ 0
  1101. THEN
  1102. BEGIN
  1103. D27M2[0] = "HCSTTP2";
  1104. ABORT(DFMSG27,0);
  1105. END
  1106. CONTROL FI;
  1107. END
  1108. NCSTTP(LLCBAD,NCN,TRIGC[0],SMPTR); # CALL NETWORK-SIDE #
  1109. END
  1110.  
  1111. IF TRIGB[0] NQ NOCHG
  1112. THEN
  1113. HBSTTP(P<ACNB>,TRIGB[0],0);
  1114.  
  1115. END
  1116.  
  1117. ELSE
  1118.  
  1119. BEGIN # ILLEGAL TRIGGER #
  1120. IF TRIGGER LS HCMINXT OR TRIGGER GR HCMAXXT
  1121. THEN
  1122. BEGIN # TRIGGER INTERNAL TO NIP #
  1123. PARAMS1 = ACBAN[0]; # APPLICATION NUMBER #
  1124. PARAMS2 = ACN; # APPLICATION CONNECTION NUMBER #
  1125. PARAMS3 = TRIGGER; # ILLEGAL TRIGGER NUMBER #
  1126. PARAMS4 = CURST; # CURRENT CONNECTION STATE #
  1127. PARAMS6 = "HCSTTP"; # NAME OF STATE TABLE PROCESSOR #
  1128. OVLNAME = STPHERRP; # ISSUE STP ERROR MESSAGE #
  1129. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  1130. ABORT(0,0); # ABORT NIP #
  1131. END
  1132. ELSE
  1133. BEGIN # ILLEGAL EXTERNAL TRIGGER FROM APP #
  1134. # ISSUE ERR/LGL TO APPLICATION #
  1135. PARAMS1 = RLG"ISM"; # RC=7 ILLOGICAL SM #
  1136. OVLNAME = HLGLERRP; # SEND ERR/LGL TO APP #
  1137. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  1138. END
  1139. END
  1140.  
  1141. END
  1142.  
  1143. ELSE
  1144.  
  1145. BEGIN
  1146. PARAMS1 = DFMSG26;
  1147. PARAMS6 = "HC";
  1148. OVLNAME = XERRMSGP;
  1149. OVLCALL;
  1150. END
  1151.  
  1152. HC77:
  1153. #
  1154.   EXIT
  1155. #
  1156. RETURN;
  1157.  
  1158. END
  1159. PROC CRACNBP ; # CREATE ACNB #
  1160. BEGIN
  1161. IF PARAMP1 EQ 0
  1162. THEN
  1163. BEGIN # WE HAVE TO CREATE AN ACNB TO NVF #
  1164. PARAMP2 = ATACBA[NVFAN] ;
  1165. END
  1166. ELSE
  1167. PARAMP2 = P<ACB> ;
  1168. PARAMP5 = STRTCX"BACNB$" ;
  1169. OVLNAME = STRTCONP; # BUILD ACNB #
  1170. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  1171. P<ACNB> = PARAMP3; # BASE ACNB #
  1172. P<ACNT> = PARAMP4; # BASE ACNT #
  1173. ACN = ACNBACN[0]; # APPLICATION CONNECTION NUMBER ASSIGNED #
  1174. ACNTINDX = ACN + ACNTHSIZE - ACNTMINACN[0];
  1175. RETURN ;
  1176. END
  1177. END
  1178. TERM
1)
ACBAD),(ACN),(TRIGGER),(SMPTR
cdc/nos2.source/nam5871/hcsttp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator