User Tools

Site Tools


cdc:nos2.source:nam5871:hpnonsa

HPNONSA

Table Of Contents

  • [00013] PRGM HPNONSA
  • [00084] PROC MRELS
  • [00085] PROC OSCCALL
  • [00086] PROC OSCHAPP
  • [00087] PROC OVLCALL
  • [00088] PROC XTRACE

Source Code

HPNONSA.txt
  1. *DECK HPNONSA
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT AT
  6. USETEXT AWLNTRY
  7. USETEXT DRHDR
  8. USETEXT FLIST
  9. USETEXT OVERLAY
  10. USETEXT PARAMS
  11. USETEXT PT
  12. USETEXT SCPCOM
  13. PRGM HPNONSA; # FINISH PROCESSING NETON OF APPLICATION #
  14.  
  15. STARTIMS;
  16. #
  17. *1DC HPNONSA
  18. *
  19. * 1. PROC NAME AUTHOR DATE
  20. * HPNONSA E. GEE 77/06/02
  21. *
  22. * 2. FUNCTIONAL DESCRIPTION.
  23. * FINISH PROCESSING NETON OF APPLICATION
  24. *
  25. * 3. METHOD USED.
  26. * CHECK IF NORMAL RESPONSE
  27. * IF NORMAL, CREATE SCP FUNCTION LIST TO WRITE NETON RESPONSE
  28. * SHORT-TERM CONN
  29. * ISSUE SCP FUNCTION
  30. * PROCESS SCP FUNCTION RETURN CODE
  31. * IF APPLICATION NETTING ON IS NS OR CS SEND
  32. * REG/CP TO PIP.
  33. * IF ABNORMAL, CHECK IF FATAL OR NON-FATAL RETURN CODE
  34. * IF FATAL, SET ABORT FLAG
  35. * IF NON-FATAL, CREATE FUNCTION LIST TO INFORM APP NETON
  36. * WAS REJECTED
  37. * ISSUE SCP FUNCTION
  38. * PROCESS SCP FUNCTION RETURN CODE
  39. * RELEASE ACB
  40. *
  41. * 4. ENTRY PARAMETERS.
  42. * ACBADDR ACB ADDRESS OF APP NETTING ON
  43. *
  44. * 5. EXIT PARAMETERS.
  45. * ABTAPPF ABORT APP FLAG SET IF APP IS TO BE ABORTED
  46. * ABTADDR ADDR OF BUF TO BE USED BY XABTAPP
  47. * ABTJOBID JOB ID WORD OF APP TO BE ABORTED
  48. * ABTSIZE SIZE OF BUF TO BE USED BY XABTAPP
  49. *
  50. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  51. * ACB APPSTAT AWLHEAD AWLNTRY
  52. * DRHDR FLIST NIPDEF OPSIZE
  53. * OVERLAY PARAMS PT SCPCOM
  54. * AT
  55. *
  56. * 7. ROUTINES AND OVERLAYS CALLED.
  57. * MRELS RELEASE BUFFER SPACE
  58. * NCREGCP OVL SEND SM REG/CP TO PIP
  59. * OSCCALL ISSUE SCP FUNCTIONS
  60. * OSCHAPP SCHEDULE APPLICATION
  61. * OSCPSI OVL SWAPIN (NO ACB) APPLICATION
  62. * OVLCALL LOAD AND EXECUTE OVERLAY
  63. * RELACB OVL RELEASE ACB
  64. * XTRACE RECORD PROCEDURE CALLS
  65. *
  66. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  67. *
  68. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  69. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  70. * TO RETURN TO THE CALLING PROGRAM.
  71. *
  72. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  73. *CALL OPSIZE
  74. *
  75. * THIS OVERLAY IS CALLED BY XSACB
  76. *
  77.  #
  78. STOPIMS;
  79. #
  80.   EXTERNAL VARIABLES
  81. #
  82. XREF
  83. BEGIN
  84. PROC MRELS; # RELEASE BUFFER SPACE #
  85. PROC OSCCALL; # ISSUE SCP CALLS #
  86. PROC OSCHAPP; # SCHEDULE APPLICATION #
  87. PROC OVLCALL; # LOAD AND EXECUTE OVERLAYS #
  88. PROC XTRACE; # RECORD PROCEDURE CALLS #
  89. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  90. END
  91. #
  92.   INTERNAL VARIABLES
  93. #
  94. ITEM BUFADDR; # FWA OF NWL BUFFER #
  95. ITEM BUFSIZE; # SIZE OF NWL BUFFER #
  96. ITEM NETONRC; # NET/ON SUP MSG RETURN CODE #
  97. ITEM RC; # SCP FUNCTION RETURN CODE #
  98.  
  99. #**********************************************************************#
  100.  
  101. BEGIN
  102.  
  103. CONTROL IFEQ DEBUG,1;
  104. XTRACE("HPNSA");
  105. CONTROL FI;
  106.  
  107.  
  108. P<ACB> = ACBADDR; # ACB ADDRESS #
  109. BUFADDR = ACBWLFWA[0]; # FWA OF REST OF NWL BUFFER #
  110. BUFSIZE = ACBWLLWA[0] - ACBWLFWA[0] + 1; # SIZE OF REST OF NWL B #
  111. JOBID = ACBJNWD[0]; # JOB ID WORD #
  112. CBA = ACBUCPADR[0]; # UCP COMPLETION BIT ADDRESS #
  113. P<AWLENTRY> = LOC(ACBAWL0[0]); # AWL NETON ENTRY ADDR #
  114. NETONRC = AWLRC[0]; # NET/ON SUP MSG RETURN CODE #
  115. #
  116.   CHECK FOR NORMAL RESPONSE
  117. #
  118. IF NETONRC EQ RNO"N"
  119. THEN # NVF OKAYED NETON #
  120. BEGIN
  121. #
  122.   CREATE FUNCTION LIST TO COMPLETE NETON PROCESSING - WRITE AWL
  123.   NETON ENTRY BACK TO APP, ESTABLISH LONG TERM CONNECTION
  124.   AND DO NOT CLEAR SHORT TERM CONNECTION SO THAT THE DATA
  125.   AVAILABILITY STATUS WORD IN APPLICATION FL MAY BE UPDATED
  126.   BY NIP AT ANY TIME
  127. #
  128. P<FLHEAD> = BUFADDR; # ADDR TO HOLD FUNCTION LIST #
  129. FLWD0[0] = 0;
  130. FLID[0] = NAFLIDVALUE ; # NON-MOVEVABLE ID FUNCTION LIST ID #
  131. FLBS[0] = FLSIZE + 2*FLESIZE; # SIZE OF FUNCTION LIST #
  132. FLFW[0] = 0;
  133. FLAN[0] = ACBAN[0]; # APP PROCESS NUMBER #
  134. FLFP[0] = 2; # NUMBER OF SFLIST ENTRIES #
  135. FLSCPA[0] = BUFADDR + FLSIZE; # ADDR OF SF.LIST ENTRIES #
  136. FLJOBID[0] = JOBID; # JOB ID WORD #
  137. P<FLE> = BUFADDR + FLSIZE;
  138. FLEWD0[0] = 0;
  139. FLEFP[0] = AWLNSIZE - BLKHSIZE; # AWL NETON ENTRY SIZE #
  140. FLEUCPA[0] = ACBAWLADDR[0]; # UCP AWL ADDR #
  141. FLESCPA[0] = P<AWLENTRY>; # AWL NETON ENTRY ADDR #
  142. FLEFC[0] = SFWRITE; # SCP SF.WRITE FUNCTION #
  143. FLEWD0[1] = 0;
  144. FLEFC[1] = SFSLTC; # SCP SF.WRITE FUNC. #
  145. #
  146.   ISSUE SCP FUNCTION
  147. #
  148. P<FLE> = LOC(FLFW[0]); # SCP FUNCTION WORD #
  149. FLFC = SFLIST;
  150. OSCCALL(FLE);
  151. #
  152.   PROCESS SCP FUNCTION RETURN CODE
  153. #
  154. RC = FLRC[0]; # SCP FUNCTION RETURN CODE #
  155. IF RC EQ 0
  156. THEN # SCP FUNCTION COMPLETED #
  157. BEGIN
  158. FLBS[0] = BUFSIZE;
  159. MRELS(BUFADDR); # RELEASE REST OF NWL #
  160. ACBAWLADDR = 0; # CLEAR UCPAWL ADDR #
  161. ACBWLFWA[0] = 0;
  162. ACBWLLWA[0] = 0;
  163. ACBAWL0[0] = 0; # CLEAR 1ST WORD OF AWL ENTRY #
  164. # IF APPLICATION IS NS OR CS
  165.   SEND REG/CP/C TO CCP #
  166. IF ACBANAME[0] EQ "CS" OR ACBANAME[0] EQ "NS"
  167. THEN
  168. BEGIN
  169. IF ACBANAME[0] EQ "CS"
  170. THEN # INITIALIZE APPLICATION NO. FOR CS #
  171. BEGIN
  172. PROCAN[CSORD] = ACBAN[0]; # SET AN IN COMMON #
  173. END
  174. ELSE # INITIALIZE APPLICATION NO. FOR NS #
  175. BEGIN
  176. PROCAN[NSORD] = ACBAN[0]; # SET AN IN COMMON #
  177. END
  178. OVLNAME = NCREGCPP; # SEND REG/CP SM TO PIP #
  179. PARAMS1 = 0; # ALL ACTIVE COUPLERS #
  180. PARAMS2 = 0 ;
  181. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  182. END
  183. END
  184. ELSE # SCP FUNCTION NOT COMPLETED #
  185. BEGIN
  186. IF RC EQ RCSWAPPEDOUT
  187. THEN # APP IS SWAPPED OUT #
  188. BEGIN # SET UP ACB TO LATER REISSUE SCP FUNCTION#
  189. ATASBO[ACBAN[0]] = TRUE; # APP SWAPPED OUT AT NETON TIME #
  190. OSCHAPP(ACBADDR); # SCHEDULE APPLICATION #
  191. END
  192. ELSE
  193. BEGIN
  194. IF RC EQ RCUCPAOOR
  195. THEN # APP GAVE US BAD UCP AWL ADDR SO ABORT IT#
  196. BEGIN
  197. ABTADDR = ACBADDR; # ACB ADDRESS #
  198. ABTAPPF = XFLERR; # SET ABORT-APPLICATION FLAG #
  199. END
  200. ELSE # APP MUST NO LONGER BE IN SYSTEM #
  201. FAILADR = ACBADDR; # ACB ADDRESS #
  202. END
  203. END
  204. END
  205. ELSE # NVF REJECTED NETON #
  206. BEGIN
  207. ACBWLFWA[0] = 0; # SO THAT SPCBDHS WILL NOT RELEASE NWL #
  208. #
  209.   CHECK IF FATAL OR NON-FATAL RETURN CODE
  210. #
  211. # SET ABORT PARAMS IN CASE APP IS TO BE ABORTED #
  212. ABTSIZE = BUFSIZE; # SIZE OF BUF FOR XABTAPP TO USE #
  213. ABTADDR = BUFADDR; # ADDR OF BUFFER FOR XABTAPP TO USE #
  214. ABTJOBID = JOBID; # JOB ID WORD OF APPLICATION TO ABORT #
  215. IF NETONRC EQ RNO"DIS" OR NETONRC EQ RNO"DUP"
  216. THEN # THIS IS A NON-FATAL NETON RETURN CODE #
  217. BEGIN
  218. #
  219.   CREATE FUNCTION LIST TO INFORM APP NETON WAS REJECTED
  220. #
  221. P<SCPCALL> = BUFADDR; # ADDR TO HOLD FUNCTION LIST #
  222. SCPID[0] = NAFLIDVALUE; # (NO ACB) FUNCTION LIST ID VALUE #
  223. SCPBS[0] = SCPSIZE + 2*FLESIZE; # SIZE OF FUNCTION LIST #
  224. SCPFW[0] = 0;
  225. SCPFP[0] = 2; # NO OF SF.LIST ENTRIES #
  226. SCPSCPA[0] = BUFADDR + SCPSIZE; # ADDR OF SF.LIST ENTRIES #
  227. SCPJOBID[0] = JOBID; # JOB ID WORD #
  228. P<FLE> = BUFADDR + SCPSIZE;
  229. FLEWD0[0] = 0;
  230. AWLEWD1[0] = 0; # ZERO AWL NETON ENTRY PN WORD #
  231. FLEUCPA[0] = ACBAWLADDR[0]; # UCP AWL ADDR #
  232. FLESCPA[0] = P<AWLENTRY>; # ADDR OF AWL NETON ENTRY #
  233. FLEFP[0] = AWLNSIZE - BLKHSIZE; # SIZE OF AWL ENTRY #
  234. FLEFC[0] = SFWRITE; # SCP SF.WRITE FUNCTION #
  235. P<FLE> = P<FLE> + FLESIZE;
  236. FLEWD0[0] = 0;
  237. FLEUCPA[0] = CBA; # UCP COMPLETION BIT ADDR #
  238. FLEFC[0] = SFENDT; # SCP SF.ENDT FUNCTION #
  239. #
  240.   ISSUE SCP FUNCTION
  241. #
  242. P<FLE> = LOC(SCPFW[0]); # SCP FUNCTION WORD #
  243. SCPFC = SFLIST;
  244. OSCCALL(FLE);
  245. #
  246.   PROCESS SCP FUNCTION RETURN CODE
  247. #
  248. RC = SCPRC[0]; # SCP FUNCTION RETURN CODE #
  249. IF RC EQ RCSWAPPEDOUT
  250. THEN # APP WAS SWAPPED OUT #
  251. BEGIN
  252. PARAMS1 = BUFADDR; # ADDR OF FUNCTION LIST #
  253. PARAMS3 = BUFADDR + SCPSIZE+2*FLESIZE; # AWL ENTRY WORD #
  254. PARAMS2 = PARAMS3 + AWLNSIZE; # SWPI ENTRY BUF ADR #
  255. P<DRHDRWD> = PARAMS3; # ADDR OF BUF TO HOLD AWL #
  256. BLKID[0] = NONMOVEABLE; # (NONMOVABLE) WRITE BUF BLK ID #
  257. BLKBS[0] = AWLNSIZE; # SIZE OF NETON AWL #
  258. P<AWLENTRY> = P<DRHDRWD> + BLKHSIZE; # ADR AWL NETON ENT #
  259. AWLEAIPH[0] = ACBAWL0[0]; # TRF AWL-WD0 TO BUF AREA #
  260. AWLEWD1[0] = ACBAWL1[0]; # TRF AWL-WD1 TO BUF AREA #
  261. P<FLE> = BUFADDR + SCPSIZE; # ADR OF SF.LIST ENTRY #
  262. FLESCPA[0] = P<AWLENTRY>; # ADR OF AWL NETON ENTRY #
  263. OVLNAME = OSCPSIP; # NAME OF OVERLAY TO LOAD #
  264. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  265. BUFADDR = BUFADDR + SCPSIZE+2*FLESIZE + SWPISIZE + AWLNSIZE;
  266. BUFSIZE = BUFSIZE - SCPSIZE-2*FLESIZE - SWPISIZE - AWLNSIZE;
  267. END
  268. IF RC EQ RCUCPAOOR
  269. THEN # APP GAVE US BAD AWL ADDR SO ABORT IT #
  270. ABTAPPF = XFLERR; # SET ABORT-APPLICATION FLAG #
  271. ELSE # OKAY TO RELELEASE REST OF NWL #
  272. BEGIN
  273. P<DRHDRWD> = BUFADDR; # FWA OF BUFFER TO RELEASE #
  274. BLKBS[0] = BUFSIZE; # SIZE OF REST OF NWL BUFFER #
  275. MRELS(BUFADDR);
  276. END
  277. END
  278. ELSE # THIS IS A FATAL NETON RETURN CODE #
  279. BEGIN
  280. IF NETONRC EQ RNO"IA"
  281. THEN # INVALID APPLICATION NAME #
  282. ABTAPPF = XINVAPP; # SET ABORT-APPLICATION FLAG #
  283. ELSE
  284. IF NETONRC EQ RNO"NPR"
  285. THEN # RESERVED APPLICATION NAME #
  286. ABTAPPF = XRESAPPNM; # SET ABORT-APPLICATION FLAG #
  287. END
  288. #
  289.   N V F R E J E C T E D N E T O N
  290.  
  291.   R E L E A S E A C B AND A C N T B U F F E R S.
  292. #
  293. PARAMS1 = ACBAN[0]; # APPLICATION NUMBER OF ACB TO RELEASE #
  294. OVLNAME = RELACBP; # NAME OF OVERLAY TO LOAD #
  295. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  296. END
  297. GOTO RJMAIN;
  298. END
  299. TERM
cdc/nos2.source/nam5871/hpnonsa.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator