User Tools

Site Tools


cdc:nos2.source:nam5871:np_smsg

NP$SMSG

Table Of Contents

  • [00007] PROC NP$SMSG
  • [00067] PROC NP$STPR
  • [00068] PROC NP$MSG

Source Code

NP$SMSG.txt
  1. *DECK,NP$SMSG
  2. *IF,DEF,XFR
  3. USETEXT AIPDEF
  4. USETEXT NX$ACBX
  5. USETEXT HEADER
  6. USETEXT NP$NWL
  7. PROC NP$SMSG;
  8. BEGIN
  9. #
  10. *1DC NP$SMSG
  11. *
  12. * 1. PROC NAME AUTHOR DATE
  13. * NP$SMSG Y. C. YIP 02/19/1985
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION
  16. *
  17. * GENERATES A LEGAL OR ILLEGAL TRIGGER BY DOING A
  18. * A TABLE LOOKUP FOR THE TRIGGER VALUE ASSOCIATED
  19. * WITH THAT ASYNC MESSAGE.
  20. *
  21. * 3. METHOD USED
  22. * FIRST A TABLE LOOKUP USING AN ARRAY PRESET WITH PFCSFC
  23. * VALUES AND THE ASSOCIATED TRIGGER VALUES IS PERFORMED.
  24. * THE LAST ENTRY OF THE ARRAY FOR EACH RESPECTIVE TABLE
  25. * (PRU SEND, PRU RECEIVE, CHARACTER SEND AND CHARACTER
  26. * RECEIVE) IS RESERVED FOR STORING THE ASSOCIATED VALUE
  27. * OF THE ILLEGAL TRIGGER. THE INCOMING PFCSFC IS FIRST
  28. * LOADED AT THE LAST ENTRY OF THE ARRAY PAIRED WITH THE
  29. * ILLEGAL TRIGGER VALUE ENTRY. IF THE SEARCH SUCCEEDS AT
  30. * AN ENTRY PRIOR TO THE LAST ENTRY THEN WE GET A SUCCESSFUL
  31. * MATCH, ELSE IT WILL MATCH WITH ITSELF LOADED EARLIER AT THE
  32. * LAST ENTRY OF THE TABLE, HENCE RETURNING THE ILLEGAL TRIGGER
  33. * IT THEN CALLS THE FILE TRANSFER ACTION PROCESSOR, NP$STPR.
  34. * XFT/IER HAS DIFFERENT TRIGGER VALUES FOR DIFFERENT REASON
  35. * CODES. A SEPARATE BLOCK IS USED TO MAP THE REASON CODE TO
  36. * THE CORRESPONDING TRIGGERS USING A SIMILAR SCHEME AS WITH
  37. * THE PFCSFC.
  38. *
  39. * 4. ENTRY CONDITIONS
  40. * FTTINDEX IS THE INDEX OF THE FILE TRANSFER CONTROL
  41. * BLOCK, FTT.
  42. * LOC$TA POINTS TO THE ADDRESS OF THE LOCATION, THE
  43. * ASYNC MESSAGE IS STORED.
  44. *
  45. * 5. EXIT CONDITONS
  46. * FTTINDEX - UNCHANGED.
  47. * A TRIGGER VALUE CONTRIG IS PRODUCED ( LEGAL OR ILLEGAL)
  48. * AND IS USED IN CALLING NP$STPR.
  49. *
  50. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  51. * NP$NWL, NX$ACBX
  52. *
  53. * 7. ROUTINES CALLED
  54. * NP$STPR - FILE TRANSFER TABLE ACTION PROCESSOR.
  55. * NP$MSG - DAYFILE MESSAGE PROCESSOR.
  56. *
  57. * 8. DAYFILE MESSAGES
  58. * ILLEGAL TRIGGER RECEIVED.
  59. #
  60.  
  61.  
  62. #
  63. **** PROC NP$SMSG - XREF LIST.
  64. #
  65. XREF # EXTERNAL REFERENCE TABLE #
  66. BEGIN
  67. PROC NP$STPR; # STATE TABLE PROCESSOR #
  68. PROC NP$MSG; # DAYFILE MESSAGE GENERATOR #
  69. END
  70.  
  71. #
  72. ****
  73. #
  74. DEF PRTBLMT # 64 #; # TABLE SIZE FOR THE 4 TABLES #
  75. DEF PRSPLOWER # 1 #; # LOWER BOUND OF PRU SENDER TABLE #
  76. DEF PRSPUPPER # 16 #; # UPPER BOUND OF PRU SENDER TABLE #
  77. DEF PRRPLOWER # 17 #; # LOWER BOUND OF PRU RECEIVER TABLE #
  78. DEF PRRPUPPER # 32 #; # UPPER BOUND OF PRU RECEIVER TABLE #
  79. DEF PRSCLOWER # 33 #; # LOWER BOUND OF CHAR SENDER TABLE #
  80. DEF PRSCUPPER # 41 #; # UPPER BOUND OF CHAR SENDER TABLE #
  81. DEF PRRCLOWER # 49 #; # LOWER BOUND OF CHAR RECEIVER TABLE#
  82. DEF PRRCUPPER # 58 #; # UPPER BOUND OF CHAR RECEIVER TABLE#
  83. DEF XFTLMT # 16 #; # SIZE OF THE XFT TABLE #
  84. DEF XFTSPLOWER # 1 #; # LOWER BOUND FOR XFT PRU SENDER #
  85. # REASON CODE TABLE #
  86. DEF XFTSPUPPER # 8 #; # UPPER BOUND FOR XFT PRU SENDER #
  87. # REASON CODE TABLE #
  88. DEF XFTRPLOWER # 9 #; # LOWER BOUND FOR XFT PRU RECEIVER #
  89. # REASON CODE TABLE #
  90. DEF XFTRPUPPER # 16 #; # UPPER BOUND FOR XFT PRU RECEIVER #
  91. # REASON CODE TABLE #
  92. ITEM CRNT$ORD; # TABLE ORDINAL #
  93. ITEM CONTRIG; # TRIGGER VALUE RESULTING FROM TABLE#
  94. ITEM RCORD; # TABLE ORDINAL FOR REASON CODE #
  95. # TABLE #
  96. # SEARCH #
  97.  
  98. ITEM BACKTRIG; # RETURN TRIGGER BY CALLING NP$STPR #
  99. ARRAY ILLTRIG[0:0] S(3); # WARNING FOR ILLEGAL TRIGGER #
  100. BEGIN
  101. ITEM ILLTRIGC C(00,00,24) = ["ILLEGAL TRIGGER RECEIVED"];
  102. ITEM ILLTRIGZ U(02,24,36) = [0];
  103. END
  104.  
  105. ARRAY PFCSFCTAB[1:PRTBLMT] S(1); # PFCSFC VS TRIGGER TABLE #
  106. BEGIN
  107. # START OF PRU SENDER TABLE #
  108. ITEM PFSFV U(00,00,16) =[ FCACK, # FOR TRIGGER NSPTFAK #
  109. FCNAK, # FOR TRIGGER NSPTFNK #
  110. CONCB, # FOR TRIGGER NSPTNCB #
  111. SHUINS, # FOR TRIGGER NSPTHSD #
  112. SHISD, # FOR TRIGGER NSPTNSL #
  113. PRUONN, # FOR TRIGGER NSPTPRN #
  114. PRUONA, # FOR TRIGGER NSPTPRA #
  115. OFTEND, # FOR TRIGGER NSPTOFN #
  116. XFTIER, # FOR TRIGGER NSPTXFR #
  117. OFTOFFN, # FOR TRIGGER NSPTOFF #
  118. INTRUSR, # FOR TRIGGER NSPTINT #
  119. INTRAPP, # FOR TRIGGER NSPTINT #
  120. FTON, # FOR TRIGGER NSPTFT #
  121. FTOFF, # FOR TRIGGER NSPTFT #
  122. FCBRK, # FOR TRIGGER NSPTBRK #
  123. , # FOR TRIGGER NRSTILL #
  124. # START OF PRU RECEIVER TABLE #
  125. FCACK, # FOR TRIGGER NRPTFAK #
  126. FCNAK, # FOR TRIGGER NRPTNAK #
  127. CONCB, # FOR TRIGGER NRPTNCB #
  128. SHUINS, # FOR TRIGGER NRPTHSD #
  129. SHISD, # FOR TRIGGER NRPTNSL #
  130. ESXOKR, # FOR TRIGGER NRPTESK #
  131. PRUONN, # FOR TRIGGER NRPTPRN #
  132. PRUONA, # FOR TRIGGER NRPTPRA #
  133. IFTEND, # FOR TRIGGER NRPTIFN #
  134. XFTIER, # FOR TRIGGER NRPTXFR #
  135. IFTOFFN, # FOR TRIGGER NRPTIFF #
  136. FCRST, # FOR TRIGGER NRPTFRT #
  137. INTRUSR, # FOR TRIGGER NRPTINT #
  138. INTRAPP, # FOR TRIGGER NRPTINT #
  139. FCBRK, # FOR TRIGGER NRPTBRK #
  140. , # FOR TRIGGER NRSTILL #
  141. # START OF CHAR SENDER TABLE #
  142. FCACK, # FOR TRIGGER NSCTFAK #
  143. FCNAK, # FOR TRIGGER NSCTFNK #
  144. FCBRK, # FOR TRIGGER NSCRBRK #
  145. CONCB, # FOR TRIGGER NSCTNCB #
  146. SHUINS, # FOR TRIGGER NSCTHSD #
  147. SHISD, # FOR TRIGGER NSCTNSL #
  148. INTRUSR, # FOR TRIGGER NSCTINT #
  149. INTRAPP, # FOR TRIGGER NSCTINT #
  150. , # FOR TRIGGER NSCTILL #
  151. ,
  152. ,
  153. ,
  154. ,
  155. ,
  156. ,
  157. ,
  158. # START OF CHAR RECEIVER TABLE #
  159. FCACK,# FOR TRIGGER NRCTFAK #
  160. FCNAK,# FOR TRIGGER NRCTNAK #
  161. FCBRK,# FOR TRIGGER NRCTBRK #
  162. FCRST,# FOR TRIGGER NRCTRST #
  163. CONCB,# FOR TRIGGER NRCTNCB #
  164. SHUINS,# FOR TRIGGER NRCTHSD #
  165. SHISD,# FOR TRIGGER NRCTNSL #
  166. INTRUSR,# FOR TRIGGER NRCTINT #
  167. INTRAPP,# FOR TRIGGER NRCTINT #
  168. ,# FOR TRIGGER NRCTILL #
  169. ,
  170. ,
  171. ,
  172. ,
  173. ,
  174. ];
  175.  
  176. ITEM PFSFTRIG U(00,30,30) = # START OF PRU SENDER TABLE #
  177. [ NSPTFAK, # FCACK #
  178. NSPTFNK, # FCNAK #
  179. NSPTNCB, # CONCB #
  180. NRSTHSD, # SHUINS #
  181. NRSTNSL, # SHISD #
  182. NSPTPRN, # PRUONN #
  183. NSPTPRA, # PRUONA #
  184. NSPTOFN, # OFTEND #
  185. NSPTXFR, # XFTIER #
  186. NSPTOFF, # OFTOFFN #
  187. NSPTINT, # INTRUSR #
  188. NSPTINT, # INTRAPP #
  189. NSPTFT , # FTON #
  190. NSPTFT , # FTOFF #
  191. NSPTBRK, # FCBRK #
  192. NRSTILL, # ILLEGAL TRIGGER #
  193. # START OF PRU RECEIVER#
  194. # TABLE #
  195. NRPTFAK, # FCACK #
  196. NRPTNAK, # FCNAK #
  197. NRPTNCB, # CONCB #
  198. NRSTHSD, # SHUINS #
  199. NRSTNSL, # SHISD #
  200. NRPTESK, # ESXOKR #
  201. NRPTPRN, # PRUONN #
  202. NRPTPRA, # PRUONA #
  203. NRPTIFN, # IFTEND #
  204. NRPTXFR, # XFTIER #
  205. NRPTIFF, # IFTOFFN #
  206. NRPTFRT, # FCRST #
  207. NRPTINT, # INTRUSR #
  208. NRPTINT, # INTRAPP #
  209. NRPTBRK, # FCBRK #
  210. NRSTILL, # ILLEGAL TRIGGER #
  211. # START OF CHAR SENDER #
  212. # TABLE #
  213. NSCTACK, # FCACK #
  214. NSCTNAK, # FCNAK #
  215. NSCTBRK, # FCBRK #
  216. NSCTNCB, # CONCB #
  217. NSCTHSD, # SHUINS #
  218. NSCTNSL, # SHISD #
  219. NSCTINT, # INTRUSR #
  220. NSCTINT, # INTRAPP #
  221. NSCTILL, # ILLEGAL TRIGGER #
  222. ,
  223. ,
  224. ,
  225. ,
  226. ,
  227. ,
  228. ,
  229. # START OF CHAR RECVER #
  230. # TABLE #
  231. NRCTACK, # FCACK #
  232. NRCTNAK, # FCNAK #
  233. NRCTBRK, # FCBRK #
  234. NRCTRST, # FCRST #
  235. NRCTNCB, # CONCB #
  236. NRCTHSD, # SHUINS #
  237. NRCTNSL, # SHISD #
  238. NRCTINT, # INTRUSR #
  239. NRCTINT, # INTRAPP #
  240. NRCTILL, # ILLEGAL TRIGGER #
  241. ,
  242. ,
  243. ,
  244. ,
  245. ,
  246. ];
  247. END
  248.  
  249. ARRAY BLKPTR [ 0:3] S(1); # CONTROL BLOCK FOR INDEXES INTO #
  250. BEGIN
  251. # THE FOUR PFCSFC TABLES #
  252. ITEM BLKLOWER U(00,00,30) = [ PRSPLOWER, # LOWER BOUND OF PRU #
  253. # SENDER #
  254. PRRPLOWER, # LOWER BOUND OF PRU #
  255. # RECEIVER #
  256. PRSCLOWER, # LOWER BOUND OF CHAR#
  257. # SENDER #
  258. PRRCLOWER # LOWER BOUND OF CHAR#
  259. # RECEIVER #
  260. ];
  261. ITEM BLKUPPER U(00,30,30) = [ PRSPUPPER, # UPPER BOUND OF PRU #
  262. # SENDER #
  263. PRRPUPPER, # UPPER BOUND OF PRU #
  264. # RECEIVER #
  265. PRSCUPPER, # UPPER BOUND OF CHAR#
  266. # SENDER #
  267. PRRCUPPER # UPER BOUND OF CHAR #
  268. # RECEIVER #
  269. ];
  270. END
  271.  
  272. ARRAY XFTRCTRIG [1:XFTLMT] S(1); # RC - TRIGGER VALUE TABLE #
  273. BEGIN # PRU SENDER XFTIER RC TABLE #
  274. ITEM XFTRC U(00,00,30) = [ RC2, # REASON CODE 2 #
  275. RC3, # REASON CODE 3 #
  276. RC4, # REAOSN CODE 4 #
  277. RC9, # REASON CODE 9 #
  278. RC6, # REASON CODE 6 #
  279. RC10, # REASON CODE 10 #
  280. RC8, # REASON CODE 8 #
  281. , # PRU RECEIVER #
  282. RC1, # REASON CODE 1 #
  283. RC10, # REASON CODE 10 #
  284. RC8, # REASON CODE 8 #
  285. RC3, # REASON CODE 3 #
  286. RC5, # REASON CODE 5 #
  287. RC7, # REASON CODE 7 #
  288. RC9, # REASON CODE 9 #
  289. ];
  290. ITEM XFTRIGV U(00,30,30) = [ # PRU SENDER #
  291. NSPTQRE, # FOR RC=2 #
  292. NSPTXFR, # FOR RC=3 #
  293. NSPTQRE, # FOR RC=4 #
  294. NSPTRCT, # FOR RC=9 #
  295. NSPTIO7, # FOR RC=6 #
  296. NSPTQRE, # FOR RC=10 #
  297. NSPTQRE, # FOR RC = 8 #
  298. NRSTILL, # ILLEGL TRIGGER #
  299. # PRU RECEIVER #
  300. NRPTXFR, # FOR RC=1 #
  301. NRPTXFR, # FOR RC=10 #
  302. NRPTIO7, # FOR RC=8 #
  303. NRPTBR3, # FOR RC=3 #
  304. NRPTES5, # FOR RC=5 #
  305. NRPTIO7, # FOR RC=7 #
  306. NRPTTM9, # FOR RC=9 #
  307. NRSTILL # FOR ILLEGAL TRIGGER #
  308. ];
  309. END
  310.  
  311.  
  312. ARRAY RCPTR[0:1] S(1); # REASON CODE INDEX CONTROL BLOCK #
  313. BEGIN
  314. ITEM RCLOWER U(00,00,30) = [ XFTSPLOWER, # LOWER BOUND FOR PRU #
  315. # SENDER #
  316. XFTRPLOWER, # UPPER BOUND FOR PRU #
  317. # RECIVER #
  318. ];
  319. ITEM RCUPPER U(00,30,30) = [ XFTSPUPPER, # UPPER BOUND FOR PRU #
  320. # SENDER #
  321. XFTRPUPPER, # UPPER BOUND FOR PRU#
  322. # RECEIVER #
  323. ];
  324. END
  325.  
  326.  
  327. ITEM INDEX; # LOOP INDEX #
  328. ITEM LEVLOP B; # FLAG TO LEAVE LOOP #
  329.  
  330. CONTROL EJECT;
  331.  
  332. # #
  333. # #
  334. # CODE OF PROC NP$SMSG BEGINS HERE #
  335. # #
  336. # #
  337. P<SUPMSG> = LOC$TA; # PULL TEMPLATE OVER MESSAGE #
  338. PRERC = RC; # SAVE REASON CODE #
  339. CRNT$ORD = FTTSTORD[FTTINDEX];#PICKS UP TABLE ORDINAL FROM FTT #
  340. IF PFCSFC NQ FCINA # SKIP FCINA #
  341. THEN
  342. BEGIN
  343. LEVLOP = FALSE; # SET FLAG TO FALSE #
  344. PFSFV[BLKUPPER[CRNT$ORD]] = PFCSFC; # LOAD PFCSFC AT ILLEGAL #
  345. # TRIGGER ENTRY #
  346. FOR INDEX = BLKLOWER[CRNT$ORD] STEP 1 WHILE NOT LEVLOP
  347. DO
  348. BEGIN
  349. IF PFCSFC EQ PFSFV[INDEX] # IF MATCH FOUND #
  350. THEN
  351. BEGIN
  352. CONTRIG = PFSFTRIG[INDEX]; # SAVE TRIGGER VALUE #
  353. LEVLOP = TRUE; # SET FLAG TO EXIT LOOP #
  354. IF INDEX EQ BLKUPPER[CRNT$ORD]
  355. THEN
  356. BEGIN
  357. NP$MSG(ILLTRIG,XFRDTYPE); # ILLEGAL TRIGGER RECEIVED #
  358. END # TO DAYFILE #
  359. END
  360. END
  361.  
  362. IF CONTRIG EQ NSPTXFR AND CRNT$ORD EQ NETSPOD #SPECIAL CASE #
  363. # XFTIER #
  364. OR CONTRIG EQ NRPTXFR AND CRNT$ORD EQ NETRPOD
  365. THEN
  366. BEGIN
  367. RCORD = CRNT$ORD;
  368. LEVLOP = FALSE;
  369. XFTRC[RCUPPER[RCORD]] = RC; # LOAD RC INTO TABLE #
  370. FOR INDEX = RCLOWER[RCORD] STEP 1 WHILE NOT LEVLOP
  371. # SCAN REASON CODE TABLE #
  372. DO
  373. BEGIN
  374. IF RC EQ XFTRC[INDEX] # IF MATCH FOUND #
  375. THEN
  376. BEGIN
  377. CONTRIG = XFTRIGV[INDEX]; # SAVE TRIGGER VALUE #
  378. LEVLOP = TRUE; # SET FLAG TO LEAVE LOOP #
  379. IF INDEX EQ RCUPPER[RCORD] # IF UPPER BOUND REACHED #
  380. THEN
  381. BEGIN
  382. NP$MSG(ILLTRIG,XFRDTYPE); # ILLEGAL TRIGGER RECEIVED #
  383. END # TO DAYFILE #
  384. ELSE
  385. BEGIN
  386. FTTICKVAL[FTTINDEX] = SPMCKMS[0]; # UPDATE LAST CHECK#
  387. # MARK NUMBER ACKNOWLEDGED #
  388. FTTCURPRU[FTTINDEX] = SPMCKMP[0]; # UPDATE CURRENT #
  389. END # PRU POSITION #
  390. # ASSOCIATED WITH #
  391. END # LAST CHECKMARK #
  392. END
  393. END
  394. BACKTRIG = CONTRIG; # SET BACKTRIG TO TRIGGER #
  395. FOR INDEX = 0 WHILE BACKTRIG NQ NIL# REPEAT UNTIL BACKTRIG IS #
  396. DO # NIL #
  397. BEGIN
  398. CONTRIG = BACKTRIG; # SET CONTRIG TO BACKTRIG #
  399. NP$STPR(FTTINDEX,CONTRIG,BACKTRIG);# CALL NP$STPR #
  400. END
  401. END
  402. RETURN; # RETURN FROM CALLER #
  403. END # END OF PROC NP$SMSG #
  404. TERM
  405. *ENDIF
cdc/nos2.source/nam5871/np_smsg.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator