User Tools

Site Tools


cdc:nos2.source:nam5871:hpnoffn

HPNOFFN

Table Of Contents

  • [00015] PRGM HPNOFFN

Source Code

HPNOFFN.txt
  1. *DECK HPNOFFN
  2. USETEXT NIPDEF
  3. USETEXT AT
  4. USETEXT ACB
  5. USETEXT APPSTAT
  6. USETEXT OVERLAY
  7. USETEXT PARAMP
  8. USETEXT PARAMS
  9. USETEXT PT
  10. USETEXT DUMPFLG
  11. USETEXT FLIST
  12. USETEXT MSGIDX
  13. USETEXT SUPMSG
  14. USETEXT SCPCOM
  15. PRGM HPNOFFN ;
  16. STARTIMS;
  17. #
  18. *1DC HPNOFFN
  19. * 1. PROC NAME AUTHOR DATE
  20. * HPNOFFN L.T.NGUYEN 82/06/16
  21. *
  22. * 2. FUNCTIONAL DESCRIPTION:
  23. * PROCESS NET/OFF/N AND FAIL/APP/N FROM APPLICATION.
  24. *
  25. * 3. METHOD USED:
  26. * IF NETTED OFF APPLICATION IS NS OR CS, SEND REG/CP.
  27. * IF NOT PRU APPLICATION, GO AHEAD RELEASE THE ACB.
  28. *
  29. * 4. INPUT PARAMS:
  30. * PARAMP1 - APPLICATION NUMBER OF NETTED OFF APPLICATION
  31. *
  32. * 5. EXIT PARAMS:
  33. * NONE.
  34. *
  35. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  36. * NIPDEF AT ACB
  37. * OVERLAY PARAMP PARAMS
  38. * PT
  39. *
  40. * 7. ROUTINES CALLED
  41. * NCREGCP OVL SEND REG/CP
  42. * RELACB OVL RELEASE ACB
  43. * OVLCALL LOAD AND EXECUTE OVERLAY
  44. * XTRACE TRACE PROCEDURE CALL
  45. *
  46. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  47. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  48. *CALL OPSIZE
  49. * THIS PROGRAM IS CALLED BY HPPUT.
  50. *
  51. *
  52.  #
  53. STOPIMS;
  54.  
  55. #
  56.   XREF
  57. #
  58. XREF LABEL RJMAIN ;
  59. XREF PROC ABORT ;
  60. XREF PROC MGETS ;
  61. XREF PROC MRELS ;
  62. XREF PROC OSCCALL ;
  63. XREF PROC OMSG ;
  64. XREF PROC RDUMP ;
  65.  
  66. XREF PROC OVLCALL ;
  67. XREF PROC XTRACE ;
  68.  
  69. ITEM AN ;
  70. ITEM FLOFFAD I ; # ADDRESS OF FLHEAD FOR NETOFFN CASE#
  71. ARRAY LOCALFL S(FLSIZE) ;
  72. BEGIN
  73. ITEM FLWORD U(0,0,60) ;
  74. END
  75. ITEM REASON U ;
  76. ITEM FLNTRY U ;
  77.  
  78. BEGIN # HPNOFFN #
  79. P<SUPMSG> = WLADDR + AIPHSIZE + ABHSIZE ;
  80.  
  81. CONTROL IFEQ DEBUG,1;
  82. IF PFCSFC[0] EQ NETOFFN
  83. THEN
  84. XTRACE("NOFFN") ;
  85. ELSE
  86. XTRACE("FAILN") ;
  87. CONTROL FI;
  88.  
  89. P<SMNVF> = P<SUPMSG> ;
  90. AN = NETAN ; # APPLICATION NUMBER #
  91.  
  92. P<AT> = PTAT[0] ;
  93. P<ACB> = ATACBA[AN] ; # ACB OF NETOFFED APPL. #
  94. IF PFCSFC[0] EQ NETOFFN
  95. THEN
  96. BEGIN # NET OFF CASE #
  97.  
  98. # CALLING SCP TO DISCONNECT SHORT AND LONG TERM CONNECTIONS #
  99.  
  100. IF ATNVFR[AN]
  101. THEN
  102. FLNTRY = 2 ; # WAITING FOR NET/ON/N #
  103. ELSE
  104. FLNTRY = 3 ; # APPLICATION NETTED ON O.K. #
  105.  
  106. MGETS(FLSIZE+SWPISIZE+FLNTRY*FLESIZE,FLOFFAD,TRUE) ;
  107.  
  108. P<FLHEAD> = FLOFFAD ;
  109. FLID[0] = NONMOVEABLE ; # MAKE FUNCTION WORKLIST NON-MOVE #
  110. FLAN[0] = AN ; # APPLICATION NUMBER #
  111. FLFW[0] = 0 ;
  112. FLFP[0] = FLNTRY ;
  113. FLFC[0] = SFLIST ; # FUNCTION CODE #
  114. FLJOBID[0] = ACBJNWD[0] ;
  115. P<FLE> = FLOFFAD + FLSIZE ;
  116. FLSCPA[0] = P<FLE> ;
  117. FLEWD0[0] = 0 ;
  118. FLEFC[0] = SFENDT ;
  119. FLEUCPA[0] = ACBUCPADR[0] + 2; # COMPLETION ADDRESS #
  120. FLEWD0[1] = 0 ;
  121. FLEFC[1] = SFENDT ;
  122. FLEUCPA[1] = ACBUCPADR[0] ; # COMPLETION ADDRESS #
  123. FLEWD0[2] = 0 ;
  124. FLEFC[2] = SFCLTC ;
  125. P<FLE> = LOC(FLFW[0]) ;
  126. OSCCALL(FLE) ;
  127. P<FLHEAD> = FLOFFAD ;
  128. END # NET/OFF/N CASE #
  129. ELSE
  130. BEGIN # APPL/FAIL/N CASE #
  131. P<FLHEAD> = LOC(LOCALFL) - 1 ; # BLOCK FOR SCP CALL #
  132. FLFW[0] = 0 ;
  133. FLUCPA[0] = -1 ;
  134. FLFC[0] = SFENDT ;
  135. FLJOBID[0] = ACBJNWD[0] ;
  136. P<FLE> = LOC(LOCALFL) ;
  137. HFCALL = TRUE ;
  138. OSCCALL(FLE) ;
  139. HFCALL = FALSE ;
  140.  
  141. END # APPL/FAIL/N CASE #
  142.  
  143.  
  144. #
  145.   PROCESS RETURNED REASON CODE
  146. #
  147. REASON = FLRC[0] ;
  148.  
  149. IF PFCSFC[0] EQ NETOFFN
  150. THEN
  151. BEGIN # NETTING OFF CASE #
  152. IF REASON EQ RCSWAPPEDOUT
  153. THEN
  154. BEGIN # SWAPPED OUT DURING NETOFF #
  155.  
  156. PARAMS1 = FLOFFAD ;
  157. FLBS[0] = FLBS[0] - SWPISIZE ; # RESET SCP BUFFER SIZE,THE #
  158. # REST IS FOR SWIPIN ENTRY #
  159. PARAMS2 = FLOFFAD + FLBS[0] ;
  160. PARAMS3 = 0 ;
  161. OVLNAME = OSCPSIP ;
  162. OVLCALL ;
  163. # GO AND RELEASE ACB IF CAN #
  164.  
  165. END # SWAPPED OUT #
  166. ELSE
  167. BEGIN # OTHER THAN SWAPPED OUT RC #
  168.  
  169. MRELS(FLOFFAD) ; # RELEASE THIS FL BUFFER #
  170.  
  171. IF REASON EQ RCUCPGONE
  172. THEN
  173. BEGIN
  174. FAILADR = P<ACB> ;
  175. GOTO RJMAIN ;
  176. END
  177. ELSE
  178. BEGIN # BAD REASON CODE #
  179. IF REASON NQ 0
  180. THEN
  181. BEGIN
  182. D25M2[0] = "HPNOFFN" ;
  183. OMSG(DFMSG25,0) ;
  184. RDUMP ;
  185. END
  186. END
  187. END # OTHER THAN SWAPPED OUT RC #
  188. END # NETTING OFF CASE #
  189.  
  190.  
  191. ELSE
  192. BEGIN # HAPFAIL CASE #
  193. IF REASON EQ RCUCPAOOR
  194. THEN
  195. BEGIN # BAD REASON CODE FROM OS #
  196. D25M2[0] = "HPFAILN";
  197. OMSG(DFMSG25,0); # "NIP DUMP TAKEN" #
  198. RDUMP ;
  199. END # BAD REASON CODE FROM OS #
  200.  
  201. END # HAPFAIL CASE #
  202.  
  203. IF AN EQ PROCAN[NSORD]
  204. OR AN EQ PROCAN[CSORD]
  205. THEN
  206. BEGIN # CS OR NS WENT AWAY #
  207.  
  208. IF AN EQ PROCAN[NSORD]
  209. THEN
  210. PROCAN[NSORD] = 0;
  211. IF AN EQ PROCAN[CSORD]
  212. THEN
  213. PROCAN[CSORD] = 0;
  214.  
  215. OVLNAME = NCREGCPP ; # SEND REG/CP TO ALL #
  216. PARAMS1 = 0 ;
  217. PARAMS2 = 0 ;
  218. OVLCALL ;
  219.  
  220. END # CS OR NS WENT AWAY #
  221.  
  222. IF ACBNPRU[0] EQ 0
  223. THEN
  224. BEGIN # NO PRU #
  225. OVLNAME = RELACBP ; # RELEASE ACB AND ACNT #
  226. PARAMS1 = AN ;
  227. OVLCALL ;
  228. END
  229. ELSE
  230. ACBWOFF[0] = TRUE ; # TURN ON WORK LIST OFF FLAG #
  231.  
  232. GOTO RJMAIN ;
  233.  
  234. END # HPNOFFN #
  235.  
  236. TERM
  237.  
cdc/nos2.source/nam5871/hpnoffn.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator