User Tools

Site Tools


cdc:nos2.source:nam5871:hprusm

HPRUSM

Table Of Contents

  • [00018] PRGM HPRUSM
  • [00081] PROC ABORT
  • [00082] PROC HCSTTP
  • [00083] PROC HRELPWL
  • [00084] PROC OMSG
  • [00085] PROC OSCHAPP
  • [00086] PROC OSREQ
  • [00087] PROC OVLCALL
  • [00088] PROC XTRACE

Source Code

HPRUSM.txt
  1. *DECK HPRUSM
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNB
  5. USETEXT ACNT
  6. USETEXT APPSTAT
  7. USETEXT AT
  8. USETEXT MSGIDX
  9. USETEXT NBT
  10. USETEXT NWLNTRY
  11. USETEXT PARAMS
  12. USETEXT PCNB
  13. USETEXT PT
  14. USETEXT PWL
  15. USETEXT OVERLAY
  16. USETEXT SSTCOM
  17. USETEXT SUPMSG
  18. PRGM HPRUSM; # PROCESS PRU INTERFACE SUPERVISORY MSG #
  19. STARTIMS;
  20. #
  21. *1DC HPRUSM
  22. * 1. PROC NAME AUTHOR DATE
  23. * HPRUSM J.C. LEE 80/04/01
  24. * S. WATANABE 81/03/16
  25. *
  26. * 2. FUNCTIONAL DESCRIPTION.
  27. * PROCESS A PRU SUPERVISORY MESSAGE FROM APPLICATION.
  28. *
  29. * 3. METHOD USED.
  30. * VALIDATE PRU SUPERVISORY MESSAGE,
  31. * FOR SWITCH FILE COMMANDS OFC/START/R OR IFC/JOB/N, ISSUE SST
  32. * REQUEST TO SWITCH FILE ASSIGNMENT FROM APPLICATION-S
  33. * CONTROL POINT TO NAM-S CONTROL POINT
  34. * FORMAT PRU WORKLIST FROM THE SUPERVISORY MESSAGE,
  35. * LINK PRU WORKLIST TO PRU WORKLIST QUEUE OF ITS PRIORITY,
  36. * UPDATE PRU WORKLIST POINTER IN PCNB,
  37. * RELEASE USED PORTION OF NWL,
  38. *
  39. * 4. ENTRY PARAMETERS.
  40. * ACBADDR APPLICATION ACB ADDRESS
  41. * WLADDR WORKLIST ENTRY ADDRESS
  42. *
  43. * 5. EXIT PARAMETERS.
  44. * NONE
  45. *
  46. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  47. * ACB ACNB ACNT APPSTAT MSGIDX
  48. * NBT NIPDEF NWLNTRY PARAMS
  49. * PCNB PWL OVERLAY SUPMSG
  50. * SSTCOM AT PT
  51. *
  52. * 7. ROUTINES AND OVERLAYS CALLED
  53. * HLGLERR OVL ISSUE ERR/LGL SUPERVISORY MESSAGE
  54. * XERRMSG OVL ISSUE ERROR MESSAGE
  55. * ODAYFL OVL ISSUE DAYFILE MESSAGE
  56. * OMSG DAYFILE MESSAGE
  57. * OSCHAPP SCHEDULE APPLICATION
  58. * OSREQ ISSUE RA+1 CALL
  59. * OVLCALL LOAD AND EXECUTE OVERLAY
  60. * XTRACE TRACE CALLS
  61. *
  62. * 8. DAYFILE MESSAGES.
  63. * NIP/SST RC = XXB,JOBID = XXXX.
  64. *
  65. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  66. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  67. * TO RETURN TO THE CALLING PROGRAM.
  68. *
  69. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  70. *CALL OPSIZE
  71. *
  72. * THIS OVERLAY IS CALLED BY HBSTTP.
  73. *
  74.  #
  75. STOPIMS;
  76. #
  77.   EXTERNAL VARIABLES
  78. #
  79. XREF
  80. BEGIN
  81. PROC ABORT; # ABORT PROGRAM AND DAYFILE MSG #
  82. PROC HCSTTP;
  83. PROC HRELPWL; # RELEASE USED PORTION OF NWL #
  84. PROC OMSG; # DAYFILE MESSAGE #
  85. PROC OSCHAPP; # SCHEDULE APPLICATION #
  86. PROC OSREQ; # ISSUE RA + 1 CALL #
  87. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  88. PROC XTRACE; # TRACE CALLS #
  89. LABEL RJMAIN; # RETURN ADDRESS #
  90. END
  91. #
  92.   INTERNAL VARIABLES
  93. #
  94. ITEM
  95. REASON, # REASON CODE FOR LOGICAL ERROR #
  96. # OR SST CALL COMPLETION STATUS #
  97. BLKSIZE, # BLOCK SIZE #
  98. ACNBADDR, # ACNB ADDRESS #
  99. WLPRI, # WORKLIST PRIORITY #
  100. INDEX; # FOR LOOP VARIABLE #
  101. #
  102.   TABLE OF PFC/SFC CODES OF PRU INTERFACE SUPERVISORY
  103.   MESSAGES FROM APPLICATION
  104. #
  105. DEF ENDPRUHSM#17#;
  106. ARRAY PRUHSMTAB [0:ENDPRUHSM];
  107. BEGIN
  108. ITEM PRUHPFCSFC U(0,0,16) = [SETFLE, SETDEV,
  109. OFCDTA,OFCSTRT,OFTSTRT,
  110. IFCJOBN,IFCSTRT,IFTSTRT,
  111. OFCSTP, OFCRSM,
  112. IFCRSM, IFCEND, OFCRSTR,
  113. OFCABRT, IFCABRT, IFCSRTT,
  114. OFCTOM,
  115. 0];
  116. END
  117. # JUMP TABLE FOR PRU SUPERVISORY MESSAGE-S PFC/SFC #
  118. SWITCH PRUHSMJT PRUSM2,PRUSM2,
  119. PRUSM2,PRUSM1,PRUSM1,
  120. PRUSM1,PRUSM2,PRUSM1,
  121. PRUSM2,PRUSM0,
  122. PRUSM2,PRUSM2,PRUSM2,
  123. PRUSM0,PRUSM2,PRUSM2,
  124. PRUSM2,
  125. PRUSM3;
  126.  
  127. # ******************************************************************** #
  128. BEGIN
  129.  
  130. CONTROL IFEQ DEBUG,1;
  131. XTRACE("HPRSM") ;
  132. CONTROL FI;
  133.  
  134. P<ACB> = ACBADDR; # APPLICATION ACB ADDRESS #
  135. P<NWLENTRY> = WLADDR; # NWL ADDRESS #
  136. P<SUPMSG> = WLADDR + AIPHSIZE + ABHSIZE; # ADDRESS OF PRU SM #
  137. REASON = 0;
  138. P<ACNT> = ACBACNT[0];
  139. ACNBADDR = 0;
  140. IF PRUACN[0] LQ ACNTHCN[0] AND PRUACN[0] GQ ACNTMINACN[0]
  141. THEN
  142. ACNBADDR = ACNTACNB[PRUACN[0] + ACNTHSIZE - ACNTMINACN[0]];
  143.  
  144.  
  145. IF ACNBADDR NQ 0
  146. THEN
  147. BEGIN # ACN FOUND #
  148. P<ACNB> = ACNBADDR; # ACNB ADDRESS #
  149. P<PCNB> = ACNBNCNB[0]; # PCNB ADDRESS #
  150.  
  151. IF P<PCNB> EQ 0
  152. THEN # CONNECTION BROKEN TEST #
  153. BEGIN # ISSUE DAYFILE MESSAGE #
  154. PARAMS1 = DFMSG03; # APP SENT BLOCK ON BROKEN CONN #
  155. OVLNAME = XERRMSGP;
  156. OVLCALL;
  157.  
  158. CONTROL IFEQ DEBUG,1;
  159. #
  160.   IF DEBUG ON, DAYFILE ENTIRE BLOCK SENT ON BROKEN CONNECTION
  161. #
  162. PARAMS1 = WLADDR + AIPHSIZE; # ADDRESS OF BLOCK #
  163. PARAMS2 = NWLEBS[0] - AIPHSIZE; # SIZE OF BLOCK #
  164. OVLNAME = ODAYFLP;
  165. OVLCALL;
  166.  
  167. CONTROL FI;
  168.  
  169. GOTO RJMAIN;
  170. END
  171.  
  172. IF PCNBID[0] EQ PCNBIDVALUE
  173. OR PCNBID[0] EQ LCNBIDVALUE
  174. THEN # NETWORK-SIDE IS A PCNB #
  175. BEGIN # PRU/ON/SM PROCESSED ON CONN #
  176. WLPRI = CMDQP; # PRESET WL PRIORITY TO CMDQ #
  177. #
  178.   VALIDATE PFC/SFC OF THE PRU SUPERVISORY MESSAGE
  179. #
  180. PRUHPFCSFC[ENDPRUHSM] = PFCSFC[0]; # GUARANTEE MATCH IN SRCH #
  181.  
  182. FOR INDEX = 0 STEP 1 DO
  183. BEGIN
  184. IF PRUHPFCSFC[INDEX] EQ PFCSFC[0]
  185. THEN # FOUND A PFC/SFC MATCH #
  186. GOTO PRUSM;
  187. END
  188. PRUSM:
  189. #
  190.   SWITCH ON PRU SUPERVISORY MESSAGE-S PFC/SFC
  191. #
  192. GOTO PRUHSMJT [INDEX];
  193. PRUSM0:
  194. #
  195.   INTERRUPT COMMANDS OFC/RSM/R OR OFC/ABORT/R,
  196.   SET WORKLIST PRIORITY TO ICMDQP
  197. #
  198. WLPRI = ICMDQP;
  199. GOTO PRUSM2; # QUEUE WORKLIST TO QCB #
  200. PRUSM1:
  201. IF PCNBFILE[0] NQ 0
  202. THEN # FILE NOT YET TRANSFERRED BACK #
  203. BEGIN
  204. REASON = RLG"C"; # FILE STILL OUTSTANDING #
  205. GOTO PRUSM4; # ISSUE ERR/LGL TO APP #
  206. END
  207. #
  208.   SWITCH FILE COMMANDS - OFC/START/R, IFC/JOB/N (FROM PRU
  209.   APPLICATIONS , I.E. QUEUE FILES) - IFT/START/R, OFT/START/R
  210.   ( FROM FILE TRANSFER APPLICATIONS, I.E. LOCAL FILES )
  211.   ISSUE SCP REQUEST TO SWITCH FILE ASSIGNMENT FROM THE
  212.   APPLICATION-S CONTROL POINT TO NAM-S CONTROL POINT,
  213.   PROCESS SCP RETURN CODE
  214. #
  215. SSTPARAM[0] = 0; # CLEAR SST PARAMETER WORD #
  216. SSTFNTS[0] = PRUFNT[0]; # FILE-S FNT ORDINAL FROM APP #
  217. SSTFC[0] = SSTSQFFUCP; # SST FUNCTION CODE #
  218. SSTJOBID[0] = ACBJNWD[0]; # ADD JOB IDENTIFICATION #
  219. SSTPADDR[0] = LOC(SSTPARAM[0]); # FWA OF SST PARAMETER BLOCK#
  220.  
  221. OSREQ(SSTCALL[0]); # ISSUE SST RA+1 CALL #
  222.  
  223. REASON = SSTRC[0]; # SST COMPLETION STATUS #
  224.  
  225. IF REASON NQ 0
  226. THEN # SST ERROR PROCESSING #
  227. BEGIN
  228. IF REASON EQ RC$UCPSO OR # APP SWAPPED OUT BY OS #
  229. REASON EQ RC$UCPNF # APP FAILED #
  230. OR REASON EQ RC$FNTIT # ILLEGAL FILE TYPE FOR SWITCH#
  231. THEN
  232. BEGIN
  233. INDEX = REASON/8;
  234. D14M2[0] = INDEX*O"100" + REASON - INDEX*8 + O"3333";
  235. D14M3[0] = SSTJSN[0];
  236. OMSG(DFMSG14,0); # DAYFILE SST RETURN STATUS #
  237. IF REASON EQ RC$UCPSO
  238. THEN # RESUME HOST WORKLIST PROC #
  239. BEGIN # WHEN APP IS SWAPPED BACK IN #
  240. ATASBS[ACBAN[0]] = TRUE; # APP SWAPPED OUT #
  241. OSCHAPP(ACBADDR); # SCHEDULE APPLICATION #
  242. END
  243.  
  244. ELSE # INITIATE APP FAILURE PROC #
  245. BEGIN # REASON CODE 3 OR 4 #
  246. IF REASON EQ RC$FNTIT
  247. THEN
  248. BEGIN # ILLEGAL FILE TYPE FOR SWITCHING #
  249. REASON = RLG"A" ; # SEND ERR/LGL WITH RC = 11 #
  250. # ILLEGAL FILETYPE FOR TRANSFERRING#
  251. GOTO PRUSM4 ; # SEND ERR/LGL #
  252. END
  253.  
  254. FAILADR = ACBADDR ; # SPECIFY ACB ADDRESS #
  255.  
  256. END # REASON CODE 3 OR 4 #
  257.  
  258.  
  259. DONE = FALSE; # SUSPEND WORKLIST PROCESSING #
  260. GOTO RJMAIN; # RETURN TO CALLING ROUTINE #
  261. END
  262.  
  263. ELSE
  264. BEGIN
  265. RC[0] = REASON; # RETURN SST COMPLETION STATUS #
  266. GOTO PRUSM3;
  267. END
  268. END
  269. #
  270.   QUEUE FILE NOW TRANSFERRED TO NAM-S CONTROL POINT,
  271.   STORE FILE-S LFN AND FNTO IN PCNB
  272.   UPDATE FNT ORDINAL IN SUPERVISORY MESSAGE
  273. #
  274. PCNBLFN[0] = PRULFN[0];
  275. PCNBFNTO[0] = SSTFNTR[0];
  276. PRUFNT[0] = SSTFNTR[0];
  277. PRUSM2:
  278. #
  279.   FORMAT PRU WORKLIST FROM THE SUPERVISORY MESSAGE,
  280.   LINK PRU WORKLIST TO PRU WORKLIST QUEUE OF ITS PRIORITY LEVEL,
  281.   UPDATE WORKLIST POINTER IN PCNB IF NECESSARY.
  282. #
  283. BLKSIZE = NWLEBS[0]; # NWL ENTRY SIZE #
  284.  
  285. P<PWLHDR> = WLADDR; # PRU WORKLIST ADDRESS #
  286. PWLBLKHDR[0] = 0; # CLEAR PWL BLOCK HEADER WORD #
  287. PWLID[0] = PWLIDVALUE; # PRU WORKLIST ID #
  288. PWLBS[0] = BLKSIZE; # PRU WORKLIST SIZE #
  289. PWLWLHDR[0] = 0; # CLEAR PWL WORKLIST HEADER WORD#
  290. PWLHN[0] = PCNBHN[0]; # HOST NODE NUMBER #
  291. PWLTN[0] = PCNBTN[0]; # TERMINAL NODE NUMBER #
  292. PWLCN[0] = PCNBCN[0]; # CONNECTION NUMBER #
  293. PWLOP[0] = PWLOPHSM; # OPCODE, PROCESS APP-S SM #
  294.  
  295. P<PWLHDR> = LOC(PCNBIMMO[0]) + WLPRI; # PCNB-S PWL POINTER #
  296.  
  297. FOR WLPRI = WLPRI DO
  298. BEGIN # SEARCH FOR LAST WORKLIST IN Q #
  299. IF PWLNEXT[0] NQ 0
  300. THEN # NOT LAST MEMBER OF PWL QUEUE #
  301. P<PWLHDR> = PWLNEXT[0]; # UPDATE NEXT PWL ADDRESS #
  302.  
  303. ELSE # LAST PRU WORKLIST IN Q FOUND #
  304. BEGIN
  305. PWLNEXT[0] = WLADDR; # LINK CURRENT PWL TO PWL QUEUE #
  306. GOTO PRUSM4;
  307. END
  308. END
  309. PRUSM3:
  310. #
  311.   RECEIVED INVALID PRU INTERFACE SUPERVISORY MESSAGE
  312. #
  313. REASON = RLG"ISM";
  314. END
  315.  
  316. ELSE # NOT A PRU CONNECTION #
  317. REASON = RLG"A";
  318. END
  319.  
  320. ELSE # ACN NOT FOUND #
  321. REASON = RLG"ACN";
  322. PRUSM4:
  323. IF REASON NQ 0
  324. THEN
  325. BEGIN # ERROR #
  326. PARAMS1 = REASON; # REASON FOR REJECTING PRU/SM #
  327. OVLNAME = HLGLERRP; # SEND ERR/LGL TO APP WITH RC #
  328. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  329. END
  330. GOTO RJMAIN;
  331. END
  332. TERM
cdc/nos2.source/nam5871/hprusm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator