User Tools

Site Tools


cdc:nos2.source:nam5871:hpnoff

HPNOFF

Table Of Contents

  • [00023] PRGM HPNOFF
  • [00099] PROC ABORT
  • [00100] PROC HCSTTP
  • [00101] PROC BLINK
  • [00102] PROC MRELS
  • [00103] PROC XTRACE
  • [00104] PROC OMSG
  • [00105] PROC OSCCALL
  • [00106] PROC OSCHAPP
  • [00107] PROC OVLCALL
  • [00108] PROC RDUMP
  • [00109] PROC XRECALL

Source Code

HPNOFF.txt
  1. *DECK HPNOFF
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNT
  5. USETEXT ACNB
  6. USETEXT AHEADER
  7. USETEXT APPSTAT
  8. USETEXT AT
  9. USETEXT DRHDR
  10. USETEXT DUMPFLG
  11. USETEXT FLIST
  12. USETEXT KDIS
  13. USETEXT MSGIDX
  14. USETEXT NWLHEAD
  15. USETEXT OVERLAY
  16. USETEXT PARAMP
  17. USETEXT PARAMS
  18. USETEXT PT
  19. USETEXT SCPCOM
  20. USETEXT SUPABH
  21. USETEXT SUPMSG
  22. USETEXT DISTAIL
  23. PRGM HPNOFF; # PROCESS A *NET OFF* WORK LIST ENTRY #
  24.  
  25. STARTIMS;
  26. #
  27. *1DC HPNOFF
  28. *
  29. * 1. PROC NAME AUTHOR DATE
  30. * HPNOFF E. GEE 77/07/27
  31. *
  32. * 2. FUNCTIONAL DESCRIPTION.
  33. * THIS ROUTINE IS RESPONSIBLE FOR NETTING-OFF THE APPLICATION.
  34. *
  35. * 3. METHOD USED.
  36. * CHECK IF ACB EXISTS FOR APPLICATION NETTING OFF
  37. * IF ACB EXISTS AND THIS WAS A NEW WORKLIST, THROW AWAY ANY OLD
  38. * WORKLIST AND BUFFERS.
  39. * IF ACB EXISTS,
  40. * ABORT IF APPLICATION NETTING OFF IS NVF.
  41. * SET UP SCP FUNCTION LIST TO SEND SCP CONNECTIONS.
  42. * FORMAT AND SEND NET/OFF SUPERVISORY MESSAGE TO
  43. * NVF IF NONE OF THE NVF INTERFACE FLAGS ARE SET.
  44. * PROCESS RETURN CODE FROM SCP CALL.
  45. * IF NO ACB EXISTS, ISSUE SCP CALL TO END SHORT-TERM CONNECTION
  46. * BETWEEN NAM AND APP.
  47. * PROCESS RETURN CODE FROM SCP CALL.
  48. *
  49. * 4. ENTRY PARAMETERS.
  50. * PARAMP1 NWL ADDRESS OR NWL ENTRY ADDRESS
  51. * ACBADDR ACB ADDRESS IF PARAMP1 IS NWL ENTRY ADDRESS
  52. * WLADDR NWL ENTRY ADDRESS IF PARAMP1 IS NWL ENTRY
  53. * ADDRESS
  54. *
  55. * 5. EXIT PARAMETERS.
  56. * FAILADR SET TO ACB ADDRESS IF NIP GETS SCP RETURN
  57. * CODE = RCUCPGONE
  58. *
  59. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  60. * AHEADER APPSTAT DRHDR DUMPFLG
  61. * AT FLIST MSGIDX NIPDEF
  62. * NWLHEAD OPSIZE PT
  63. * OVERLAY PARAMS ACB
  64. * SCPCOM ACNT ACNB
  65. * KDIS SUPABH SUPMSG
  66. *
  67. * 7. ROUTINES CALLED.
  68. * ABORT ABORT PROGRAM AND DAYFILE MESSAGE
  69. * KPCLNUP OVL CLEANUP K-DISPLAY TABLES
  70. * HCSTTP HOST CONNECTION STATE TABLE PROCESSOR
  71. * OMSG OUTPUT DAYFILE MESSAGE
  72. * MRELS RELEASE BUFFER SPACE
  73. * OSCCALL SYSTEM-CONTROL-POINT CALL
  74. * OSCHAPP SCHEDULE APPLICATION
  75. * OSCPSI OVL SWAPIN (NO ACB) APPLICATION
  76. * OVLCALL LOAD AND EXECUTE OVERLAY
  77. * RDUMP DUMP NIP-S FIELD LENGTH
  78. * XTRACE TRACES CALLS
  79. *
  80. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  81. * NVF FAILURE.
  82. * NIP DUMP TAKEN - HPNOFF
  83. *
  84. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  85. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  86. * TO RETURN TO THE CALLING PROGRAM.
  87. *
  88. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  89. *CALL OPSIZE
  90. *
  91. * THIS OVERLAY IS CALLED BY HHIR.
  92. *
  93.  #
  94. STOPIMS;
  95. #
  96.   EXTERNAL VARIABLES
  97. #
  98. XREF BEGIN
  99. PROC ABORT; # ABORT PROGRAM AND DAYFILE MESSAGE #
  100. PROC HCSTTP ;
  101. PROC BLINK ;
  102. PROC MRELS;
  103. PROC XTRACE; # TRACE CALLS #
  104. PROC OMSG; # DAYFILE MESSAGE #
  105. PROC OSCCALL; # CLEAR LONG TERM CONNECTION #
  106. PROC OSCHAPP; # SCHEDULE APPLICATION #
  107. PROC OVLCALL;
  108. PROC RDUMP;
  109. PROC XRECALL; # ISSUE EVENT RECALL #
  110. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  111. END
  112. #
  113.   INTERNAL VARIABLES
  114. #
  115. ITEM I ;
  116. ITEM ACBFOUND B ;
  117. ITEM AN ;
  118. ITEM FLNTRY ;
  119. ITEM LIMIT ;
  120. ITEM IDX;
  121. ITEM REASON; # RETURN CODE FROM SYS CONTROL PT CALLS #
  122. ITEM SECACN; # APP CON NUM FOR SECONDARY APPLICATION #
  123. ITEM WLLWA ;
  124. ITEM INDX1;
  125. BASED ARRAY KALANPTR [1:1] S(1); # TEMPLATE FOR ALT BUFFER AN #
  126. BEGIN
  127. ITEM KALNO U(00,00,09);
  128. END
  129. BASED ARRAY KALNAMPTR[1:1] S(1);
  130. BEGIN # ALERT NAME POINTER #
  131. ITEM KALNAM C(00,00,07);
  132. END
  133. #**********************************************************************#
  134. BEGIN
  135. CONTROL IFEQ DEBUG,1 ;
  136. XTRACE("HPNOF") ;
  137. CONTROL FI;
  138.  
  139. CONTROL OVERLAP NWLHEADER, SCPCALL;
  140.  
  141. #
  142.   STEP 1 CHECK IF ACB EXIST
  143. #
  144.  
  145. WLADDR = NWLADDR;
  146. WLLWA = WLADDR + SIZENWL - 1 ;
  147. P<NWLHEADER> = WLADDR ;
  148. ACBFOUND = FALSE ; # CLEAR THE FLAG #
  149. P<DRHDRWD> = WLADDR;
  150. CBA = NWLHADDR[0] ;
  151. JOBID = NWLJOBID[0] ; # JOB ID WORD IN HEADER #
  152. FOR IDX = 1 STEP 1 WHILE IDX LQ ATHAN[0]
  153. AND NOT ACBFOUND
  154. DO
  155. BEGIN # FIND ACB #
  156. P<ACB> = ATACBA[IDX] ; # THIS ACB #
  157. IF P<ACB> NQ 0
  158. THEN
  159. BEGIN # NON-ZERO ACB #
  160. IF ACBJNWD[0] EQ JOBID
  161. THEN
  162. BEGIN # MATCH ACB #
  163. ACBADDR = P<ACB> ;
  164. ACBFOUND = TRUE ; # FOUND THIS ACB #
  165. IF ATNVFN[IDX] # NET/OFF/R SENT TO NVF #
  166. OR ATNVFF[IDX] # FAIL/APP/R SENT TO NVF #
  167. THEN # NO FURTHER NETOFFS ALLOWED #
  168. GOTO NOFEXIT; # RELEASE NWL BUFFER #
  169. IF ATASBI[IDX] # SWAPIN IS IN PROGREE #
  170. AND ACBSCPCB[0] EQ 0 # REQUEST NOT YET COMPLETED #
  171. THEN # WAIT FOR SWAPIN REQUEST COMPLETION #
  172. BEGIN
  173. XRECALL(LOC(ACBSWAPWR[0])); # ISSUE EVENT RECALL #
  174. ACBID[0] = ACBIDVALUE; # ALLOW ACB TO MOVE AGAIN #
  175. END
  176. ATASBV[IDX] = 0; # CLEAR APPLICATION STATUS FLAGS #
  177. END # MATCH ACB #
  178.  
  179. END # NON-ZERO ACB #
  180. END # FIND ACB #
  181.  
  182. IF ACBFOUND
  183. THEN
  184. BEGIN # ACB EXISTS #
  185.  
  186. #
  187.   NETTING OFF APPLICATION IS NVF, ABORT
  188. #
  189. AN = ACBAN[0] ;
  190. ACBUCPADR[0] = CBA ; # SAVE COMPLETION ADDRESS FOR #
  191. # NET/OFF/N PROCESSING #
  192. IF AN EQ NVFAN
  193. THEN
  194. IF NOT SHUTDOWN
  195. THEN
  196. ABORT(DFMSG10,0) ;
  197. ELSE
  198. BEGIN
  199. ATENTRYW[NVFAN] = 0 ; # ZERO OUT THE AT ENTRY OF #
  200. # NVF FOR SHUTDOWN CASE #
  201. #
  202.   TERMINATE NVF'S SCP CONNECTIONS
  203. #
  204. P<FLHEAD> = WLADDR; # NWL USED FOR SCP FUNCTION BUF #
  205. FLWD0[0] = 0;
  206. FLID[0] = NONMOVEABLE; # FUNCTION LIST BUF NONMOVABLE #
  207. FLBS[0] = FLSIZE + 3*FLESIZE; # SIZE OF FUNCTION LIST #
  208. FLFW[0] = 0;
  209. FLFP[0] = 3; # NUMBER OF FUNCTION LIST ENTRYS#
  210. FLFC[0] = SFLIST; # SCP FUNCTION CODE #
  211. FLJOBID[0] = JOBID; # NVF JOB ID #
  212. P<FLE> = WLADDR + FLSIZE;
  213. FLSCPA[0] = P<FLE>;
  214. FLEWD0[0] = 0;
  215. FLEFC[0] = SFENDT; # TERMINATE SHORT TERM CON FC #
  216. FLEUCPA[0] = CBA; # COMPLETION ADDRESS #
  217. FLEWD0[1] = 0;
  218. FLEFC[1] = SFENDT; # TERMINATE SHORT TERM CON FC #
  219. FLEUCPA[1] = CBA; # COMPLETION ADDRESS #
  220. FLEWD0[2] = 0;
  221. FLEFC[2] = SFCLTC; # TERMINATE LONG TERM CON FC #
  222. P<FLE> = LOC(FLFW[0]);
  223. OSCCALL(FLE); # ISSUE SCP CALL #
  224. #
  225.   PROCESS SCP RETURN CODE
  226. #
  227. REASON = FLRC[0]; # REASON CODE FROM SCP CALL #
  228. IF REASON EQ RCSWAPPEDOUT
  229. THEN # NVF WAS SWAPPED OUT #
  230. BEGIN
  231. PARAMS1 = WLADDR; # ADDRESS OF FUNCTION LIST #
  232. PARAMS2 = WLADDR + FLBS[0]; # ADDRESS TO SET UP SWAPIN #
  233. PARAMS3 = 0;
  234. OVLNAME = OSCPSIP; # NAME OF OVERLAY TO SET UP SWP #
  235. OVLCALL;
  236. P<DRHDRWD> = WLADDR + FLBS[0] + SWPISIZE;
  237. END
  238. ELSE # OTHER REASON CODE FROM SCP CAL#
  239. BEGIN
  240. IF (REASON NQ RCUCPGONE) AND
  241. (REASON NQ 0)
  242. THEN # BAD RETURN CODE FROM NOS #
  243. BEGIN
  244. D25M2[0] = "HPNOFFN";
  245. OMSG(DFMSG25,0); # ISSUE DAYFILE MESSAGE #
  246. RDUMP;
  247. END
  248. END
  249. END
  250. ELSE
  251. BEGIN # OTHER APPLICATION NETTED OFF #
  252.  
  253.  
  254. # CALL STATE TABLE FOR EACH EXISTING CONNECTION #
  255. # WITH NETOFF TRIGGER #
  256.  
  257. P<ACNT> = ACBACNT[0] ; # ACNT OF THIS ACB #
  258. LIMIT = ACNTHCN[0] - ACNTMINACN[0] + ACNTHSIZE ;
  259. FOR I = ACNTHSIZE STEP 1 UNTIL LIMIT
  260. DO
  261. BEGIN # CALL HC STATE TABLE #
  262. IF ACNTACNB[I] NQ 0
  263. THEN
  264. BEGIN # ACNB HERE #
  265. P<ACNB> = ACNTACNB[I] ;
  266. ACNBRC[0] = RCRC"ANO" ; # RC = 1, APPL NETTING OFF #
  267. HCSTTP(P<ACB>,ACNBACN[0],OFFAP,0) ;
  268. END
  269. ELSE
  270. BEGIN
  271. IF ACNTSECID[I] NQ 0
  272. THEN
  273. BEGIN # CONN. IS ON LOAN #
  274. SECACN = ACNTSECACN[I]; # ACN FOR SECONDARY APP #
  275. P<ACB> = ATACBA[ACNTSECAN[I]]; # ACB OF SECONDARY APP #
  276. P<ACNT> = ACBACNT[0]; # ACNT OF SECONDARY APP #
  277. P<ACNB> = ACNTACNB[SECACN-ACNTMINACN[0]+ACNTHSIZE];
  278. P<ACB> = ACBADDR; # ACB ADDR OF NETTED OFF APP #
  279. P<ACNT> = ACBACNT[0]; # RESTORE ACNT ADR FOR NETOFF AP#
  280. IF P<ACNB> NQ 0
  281. THEN # CON STILL EXISTS IN SEC APP #
  282. BEGIN
  283. ACNBPRAF[0] = TRUE; # SET PRI APP FAILED FLAG #
  284. END
  285. ELSE # BAD ENTRY IN PRI APP ACNT TABL#
  286. BEGIN
  287. ABORT("HPNOFF, NIP INTERNAL ERROR",0);
  288. END
  289. END # CONN. IS ON LOAN #
  290. END
  291.  
  292. END # CALL HC STATE TABLE #
  293. IF ACBFNTW0[0] NQ 0
  294. THEN
  295. BEGIN # FILE LOANNING EXISTED #
  296. IF ACBFNTMAS[0]
  297. THEN
  298. PARAMS1 = TMAB ; # MASTER NETTING OFF #
  299. ELSE
  300. PARAMS1 = TSOF ; # ELSE IS SLAVE #
  301. PARAMS2 = ACBAN[0] ; # AN OF NETTING OFF APPLICATION#
  302. PARAMS3 = 0 ;
  303. OVLNAME = HFNTSMP ;
  304. OVLCALL ;
  305. END
  306.  
  307. # FORM NET/OFF AND SEND TO NVF #
  308.  
  309. P<DRHDRWD> = WLADDR ; # USE SAME BUFFER FOR NETOFF #
  310. DRBS[0] = LNETOFF + BLKHSIZE + ABHSIZE ;
  311.  
  312. # APPLICATION BLOCK HEADER #
  313.  
  314. P<AHEADER> = WLADDR + BLKHSIZE ;
  315. ABHWORD[0] = SMABHW[0] ;
  316. ABHTLC[0] = LNETOFF ;
  317.  
  318. # SUPERVISOR MESSAGE #
  319.  
  320. P<SUPMSG> = WLADDR + BLKHSIZE + ABHSIZE ;
  321. P<SMNVF> = P<SUPMSG> ;
  322. NETWD0[0] = 0 ; # CLEAR THE CONTENT BEFORE #
  323. PFCSFC[0] = NETOFFR ;
  324. NETAN[0] = AN ; # APPLICATION NUMBER #
  325.  
  326. # CALL TO LINK TO NVF #
  327.  
  328. BLINK(WLADDR,ATACBA[NVFAN]) ;
  329.  
  330. OSCHAPP(ATACBA[NVFAN]) ;
  331. ATNVFN[ACBAN[0]] = TRUE ; # SET WAITING FLAG ON #
  332. WLADDR = WLADDR + DRBS[0] ; # UPDATE THE WL ADDRESS #
  333. P<DRHDRWD> = WLADDR ; # READY TO RELEASE THE REST #
  334. IF KDAM[0] # NAM K DISPLAY IN APPLICATION MODE #
  335. AND KDAN[0] EQ ACBAN[0] # ASSIGNED TO K DISPLAY #
  336. THEN # CLEAN UP NAM K DISPLAY TABLES #
  337. BEGIN
  338. P<KALANPTR> = LOC(KDALAN1[0]);
  339. P<KALNAMPTR> = LOC(KAPALT1[0]);
  340. FOR INDX1 = 1 STEP 1 UNTIL KMAXALT
  341. DO
  342. BEGIN
  343. IF KDAN[0] EQ KALNO[INDX1]
  344. THEN # CLEAN UP ALERT BUFFER #
  345. BEGIN
  346. KALNO[INDX1] = 0;
  347. KALNAM[INDX1] = " ";
  348. END
  349. END
  350. OVLNAME = KPCLNUPP;
  351. OVLCALL;
  352. END
  353. END # OTHER APPLICATION NETTED OFF #
  354.  
  355.  
  356. END # ACB EXISTS #
  357.  
  358. ELSE
  359. BEGIN # ACB DOES NOT EXIST #
  360. P<SCPCALL> = WLADDR ; # OVERWRITE SCP BUFFER #
  361. SCPWD0[0] = 0;
  362. SCPID[0] = NAFLIDVALUE ; # FUNCTION BLOCK ID #
  363. SCPBS[0] = SCPSIZE;
  364. SCPFW[0] = 0 ;
  365. SCPUCPA[0] = CBA ; # COMPLETION BIT ADDR #
  366. SCPFC[0] = SFENDT ;
  367. P<FLE> = LOC(SCPFW[0]) ;
  368. OSCCALL(FLE) ;
  369. P<FLHEAD> = WLADDR ;
  370. REASON = FLRC[0] ;
  371. P<DRHDRWD> = P<FLHEAD> ;
  372.  
  373. IF REASON NQ 0
  374. THEN
  375. BEGIN # NOT O.K. #
  376. IF REASON EQ RCSWAPPEDOUT
  377. THEN
  378. BEGIN # SWAPPED OUT #
  379.  
  380. PARAMS1 = WLADDR ;
  381. PARAMS2 = WLADDR + FLBS[0] ;
  382. PARAMS3 = 0 ;
  383. OVLNAME = OSCPSIP ;
  384. OVLCALL ;
  385. P<DRHDRWD> = WLADDR + FLBS[0] + SWPISIZE ;
  386. END # SWAPPED OUT #
  387. ELSE
  388. BEGIN
  389. D25M2[0] = "HPNOFF ";
  390. OMSG(DFMSG25,0); # "NIP DUMP TAKEN" #
  391. RDUMP ;
  392. END
  393.  
  394. END #NOT O.K. #
  395.  
  396.  
  397.  
  398. END # ACB DOES NOT EXIST #
  399.  
  400. NOFEXIT: # RELEASE UNUSED BUFFER SPACE #
  401. BLKBS[0] = WLLWA - P<DRHDRWD> + 1 ;
  402. MRELS(P<DRHDRWD>) ;
  403. GOTO RJMAIN;
  404. END
  405. TERM
cdc/nos2.source/nam5871/hpnoff.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator