User Tools

Site Tools


cdc:nos2.source:nam5871:hswacnb

HSWACNB

Table Of Contents

  • [00013] PRGM HSWACNB
  • [00082] PROC ABORT
  • [00083] PROC DELCDR
  • [00084] PROC HUPDDAW
  • [00085] PROC INSCDR
  • [00086] PROC OVLCALL
  • [00087] PROC HALLOCN
  • [00088] PROC KPUT
  • [00089] PROC RELACNB
  • [00090] PROC XTRACE

Source Code

HSWACNB.txt
  1. *DECK HSWACNB
  2. USETEXT ACB
  3. USETEXT ACNB
  4. USETEXT ACNT
  5. USETEXT AT
  6. USETEXT KDIS
  7. USETEXT KHDRX
  8. USETEXT NIPDEF
  9. USETEXT OVERLAY
  10. USETEXT PARAMP
  11. USETEXT PARAMS
  12. USETEXT SYSTIME
  13. PRGM HSWACNB; # SWITCH ACNB FROM ONE APP TO ANOTHER #
  14. STARTIMS;
  15. #
  16. *1DC HSWACNB
  17. * 1. PROC NAME AUTHOR DATE
  18. * HSWACNB C. BITTNER 81/12/01
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION
  21. * SWITCH ACNB FROM OLD APPLICATION TO NEW APPLICATION
  22. *
  23. * 3. METHOD
  24. * CALL HALLOCN TO ALLOCATE A NEW CONNECTION NUMBER
  25. * PICK UP ACNT ENTRY OF OLD CONNECTION FOR NEW ACNT ENTRY
  26. * ASSIGN ACNB OF OLD CONNECTION AS ADDRESS OF NEW CONNECTION (ACNB)
  27. * IF DATA QUEUED TO ACNB,
  28. * CALL DELCDR TO DELETE ACNB FROM CONNECTION DATA RING.
  29. * CALL RELACNB TO DELETE OLD ACN
  30. * UPDATE FIELDS IN ACNB
  31. * IF DATA QUEUED TO ACNB,
  32. * CALL INSCDR TO INSERT ACNB IN CONNECTION DATA RING.
  33. *
  34. * 4. ENTRY PARAMETERS
  35. * PARAMS1 ADDRESS OF OLD ACB
  36. * PARAMS2 OLD CONNECTION NUMBER
  37. * PARAMS3 ADDRESS OF NEW ACB
  38. * PARAMS4 CONNECTION NO IF RETURNING LOANED CON
  39. * PARAMS8 FLAG TO INDICATE IF CONNECTION BEING LOANED
  40. * = FALSE IF NOT BEING LOANED.
  41. * = TRUE IF BEING LOANED.
  42. *
  43. * 5. EXIT PARAMETERS
  44. * PARAMS1 ADDRESS OF NEW ACNB
  45. * = 0 IF NO NEW ACNB WAS ASSIGNED.
  46. *
  47. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  48. * ACB
  49. * ACNB
  50. * ACNT
  51. * AT
  52. * NIPDEF
  53. * OVERLAY
  54. * PARAMS
  55. * SYSTIME
  56. *
  57. * 7. ROUTINES AND OVERLAYS CALLED
  58. * DELCDR DELINK ACNB FROM CONNECTION DATA TABLE
  59. * HALLOCN - ALLOCATE NEW CONNECTION NUMBER
  60. * HUPDDAW UPDATE DATA AVAILABLE WORD
  61. * INSCDR INSERT ACNB IN CONNECTION DATA RING
  62. * RELACNB RELEASE OLD ACNB
  63. * STRTSW OVL TRIGGER ROUTINE RELACNB
  64. * XTRACE - RECORD PROCEDURE CALL
  65. *
  66. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  67. * THIS PROGRAM IS A SECONDARY OVERLAY CALLED BY HCSTTP.
  68. *
  69. * W A R N I N G - THIS PROGRAM PLUS PROCEDURE RELACNB CANNOT
  70. * EXCEED THE SECONDARY OVERLAY BUFFER SIZE MINUS
  71. * 5 (473B WORDS).
  72. *
  73.  #
  74. STOPIMS;
  75.  
  76.  
  77. #
  78.   EXTERNAL VARIABLES
  79. #
  80. XREF
  81. BEGIN
  82. PROC ABORT ;
  83. PROC DELCDR; # DELINK ACNB FROM CONNECTION DATA RING #
  84. PROC HUPDDAW; # UPDATE DATA AVAILABLE WORD #
  85. PROC INSCDR; # INSERT ACNB IN CONNECTION DATA RING #
  86. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  87. PROC HALLOCN ;
  88. PROC KPUT ;
  89. PROC RELACNB; # RELEASE OLD ACNB #
  90. PROC XTRACE; # RECORD PROCEDURE CALL #
  91. LABEL RJMAIN; # ADDRESS IN OVLCALL TO RETURN TO #
  92. END
  93.  
  94. #
  95.   INTERNAL VARIABLES
  96. #
  97. ITEM ACN; # APPLICATION CONNECTION NUMBER #
  98. ITEM ACNTINDX; # INDEX INTO ACNT #
  99. ITEM INCR B; # TRUE = INCREASE NO OF DELIVERABLES#
  100. ITEM NUMBLKS; # NUMBER OF DATA BLOCKS QUEUED TO ACNB #
  101. ITEM OACNTINDX; # INDEX INTO OLD ACNT #
  102. ITEM OLDACNB; # OLD ACNB #
  103. ITEM OLDACNT; # OLD ACNT #
  104. ITEM OLDCN; # OLD CONNECTION NUMBER #
  105. ITEM TEMPACNT; # ACNT ENTRY OF CONNECTION #
  106. ITEM PRIMINFO ; # PRIMARY APPLICATION INFO #
  107.  
  108. ARRAY HSWERR S(4) ;
  109. BEGIN
  110. ITEM HSWERR1 C(0,0,31) = [" NIP CANNOT RETURN LOANED CONN."] ;
  111. ITEM HSWERR2 U(3,6,54) = [0] ;
  112. END
  113. #**********************************************************************#
  114.  
  115. BEGIN
  116.  
  117. CONTROL IFEQ DEBUG,1;
  118. XTRACE("HSWAC") ;
  119. CONTROL FI;
  120.  
  121. P<ACB> = PARAMS1; # ADDRESS OF OLD ACB #
  122. OLDCN = PARAMS2; # OLD CONNECTION NUMBER #
  123. ACN = PARAMS4; # NEW CONNECTION NUMBER IF LOANED CN#
  124. P<ACNT> = ACBACNT[0];
  125. OLDACNT = P<ACNT>;
  126. OACNTINDX = OLDCN - ACNTMINACN[0] + ACNTHSIZE;
  127. OLDACNB = ACNTACNB[OACNTINDX];
  128. P<ACNB> = OLDACNB;
  129. TEMPACNT = ACNTWD[OACNTINDX]; # SAVE STATES FOR CONNECTION #
  130. IF ACN EQ 0
  131. THEN
  132. BEGIN # ALLOCATE THE ACN #
  133. HALLOCN(PARAMS3,ACN); # ALLOCATE NEW CONNECTION NUMBER #
  134. END
  135. IF ACN NQ 0
  136. THEN
  137. BEGIN
  138. PRIMINFO = ACNBPRID[0] ; # SAVE THE PRIM APPL. INFO #
  139. NUMBLKS = ACNBBLKSQ[0];
  140. IF NUMBLKS NQ 0
  141. THEN # DATA QUEUED TO ACNB #
  142. BEGIN
  143. DELCDR(OLDACNB); # DELETE ACNB FROM CONNECTION DATA RING #
  144. HUPDDAW(P<ACB>,P<ACNB>,-NUMBLKS,-NUMBLKS);
  145. END
  146. IF KDIS$RT
  147. AND ACBKNDX[0] NQ 0
  148. AND ACBKNDX[0] GQ KDAPPST[0]
  149. AND ACBKNDX[0] LQ KDAPPND[0]
  150. THEN
  151. KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],KPAPNDM,ACBBLKSQ[0]) ;
  152. INCR = FALSE; # DECREMENT NO OF DELIVERABLE BLKS #
  153. P<ACB> = PARAMS3; # ADDRESS OF NEW ACB #
  154. P<ACNT> = ACBACNT[0];
  155. ACNTINDX = ACN + ACNTHSIZE - ACNTMINACN[0];
  156. CONTROL IFEQ DEBUG,1;
  157. IF ACNTACNB[ACNTINDX] NQ 0
  158. AND ACNBPRID[0] NQ 0
  159. THEN
  160. ABORT(HSWERR,0) ; # ACTIVE CONNECTION IN LOANED ENTRY #
  161. CONTROL FI;
  162. ACNTWD[ACNTINDX] = TEMPACNT; # ACNT ENTRY OF CONNECTION #
  163. ACNTABO[ACNTINDX] = 0 ; # CLEAR THE ABO COUNT #
  164. ACNTACNB[ACNTINDX] = OLDACNB; # SWITCH ACNB FROM NVF TO APP
  165.   OR FROM OLD APP TO NEW APP #
  166. ACNBLO[0] = FALSE; # CLEAR LIST OFF FLAG #
  167. RELACNB(OLDACNB,TRUE,PARAMS8); # CLEAN UP OLD ACNB INFOMATION #
  168.  
  169. # SET FIELDS IN ACNB #
  170.  
  171. P<ACNB> = OLDACNB;
  172. ACNBAN[0] = ACBAN[0]; # APPLICATION NUMBER #
  173. ACNBACN[0] = ACN; # APPLICATION CONNECTION NUMBER #
  174. ACNBTLO[0] = ATDIS[ACNBAN[0]]; # UPDATE TEMP LIST OFF FLAG #
  175. IF NUMBLKS NQ 0
  176. THEN # DATA QUEUED TO ACNB #
  177. BEGIN
  178. HUPDDAW(P<ACB>,P<ACNB>,NUMBLKS,NUMBLKS);
  179. INSCDR(P<ACNB>); # INSERT ACNB INTO CONNECTION DATA RING #
  180. END
  181. ACBNCN[0] = ACBNCN[0] + 1 ; # UPDATE NUMBER OF CONN TO APP#
  182. IF KDIS$RT
  183. AND ACBKNDX[0] NQ 0
  184. AND ACBKNDX[0] GQ KDAPPST[0]
  185. AND ACBKNDX[0] LQ KDAPPND[0]
  186. THEN
  187. KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],KPAPNCN,ACBNCN[0]);
  188. ACNBFLAGS[0] = FALSE ;
  189. ACNBBCHK[0] = FALSE; # CLEAR BLOCK SEQUENCE CHECK FLAGS #
  190. ACNBD[0] = ATT[ACNBAN[0]]; # DATA TRUNCATION FLAG #
  191. ACNBH[0] = ATH[ACNBAN[0]]; # HALF DUPLEX FLAG #
  192. ACNBINACT[0] = RTSECS[0] + INACTVAL;
  193. ACNBPRID[0] = PRIMINFO ; # RESTORE THE PRIM APPL. INFO #
  194. PARAMS1 = P<ACNB>; # ADDRESS OF NEW ACNB #
  195. INCR = TRUE; # DECREMENT NO OF DELIVERABLE BLKS #
  196. END
  197. ELSE
  198. BEGIN
  199. PARAMS1 = 0; # NO NEW ACNB WAS ASSIGNED #
  200. END
  201. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  202. END
  203. TERM
cdc/nos2.source/nam5871/hswacnb.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator