User Tools

Site Tools


cdc:nos2.source:nam5871:np_data

NP$DATA

Table Of Contents

  • [00008] PROC NP$DATA
  • [00067] PROC NP$STPR
  • [00068] PROC NP$MSG
  • [00069] PROC NP$CIO
  • [00278] PROC PRDCOPY
  • [00406] PROC PRDERR

Source Code

NP$DATA.txt
  1. *DECK,NP$DATA
  2. *IF,DEF,XFR
  3. USETEXT AIPDEF
  4. USETEXT HEADER
  5. USETEXT NP$NWL
  6. USETEXT NP$GETS
  7. USETEXT NX$ACBX
  8. PROC NP$DATA;
  9. BEGIN
  10. #
  11. *1DC NP$DATA
  12. *
  13. * 1. PROC NAME AUTHOR DATE
  14. * NP$DATA Y. C. YIP 02/19/1985
  15. *
  16. * 2. FUNCTIONAL DESCRIPTION
  17. * NP$DATA CHECKS THE MESSAGES THAT THE NETXFRC PASSES
  18. * TO IT. THE END RESULT OF THE VARIOUS CHECKS WILL
  19. * PROCDUCE A TRIGGER USED IN CALLING NETSTPR, THE
  20. * THE STATE TABLE ACTION PROCESSOR.
  21. *
  22. * 3. METHOD USED
  23. * VALUES OF THE QMSG MESSAGES FOR FILE TRANSFER ARE
  24. * STORED IN AN ARRAY TOGETHER WITH INTERNAL TRIGGER
  25. * VALUE. THE UPPER SLOT + 1 OF EACH QMSG COLUMN
  26. * ALWAYS CONTAINS THE ILLEGAL TRIGGER VALUE FOR
  27. * EACH STATE TABLE, (PRU MODE SEND, RECEIVER, AND
  28. * CHARACTER MODE SEND, AND RECEIVE). THE RECEIVED
  29. * QMSG IS ALWAYS DEPOSITED AT THE UPPDER SLOT + 1
  30. * OF EACH QMSG COLUMN OF THE RESPECTIVE TABLES.
  31. * IN CASE THERE IS NO MATCH FOR THAT QMSG FOR THE
  32. * PRESET QMSGS WITHIN THE ARRAY, IT WILL FINALLY
  33. * MATCHES ITSELF AT THE UPPER SLOT + 1 LOCATION AND
  34. * GENERATES THE ILLEGAL TRIGGER VALUE.
  35. *
  36. * NON-QBLK/QMSG MESSAGES:
  37. *
  38. * IN THE CASE OF A INTRAHOST FILE TRANSFER, IT WILL
  39. * STORE THE DATA AND WRITES DIRECTLY ON THE OUTPUT
  40. * FET WHEREAS, IN THE CASE OF A CHARACTER MODE FILE
  41. * TRANSFER, IT WILL ALWAYS WRITE ON THE DISK BUFFER.
  42. *
  43. * 4. ENTRY CONDITIONS
  44. * LOC$HA AND LOC$TA ARE THE HEADERS AND TEXT AREAS
  45. * FOR THE MESSAGES BLOCK TYPE CAN BE 1,2,6 OR 7.
  46. *
  47. * 5. EXIT CONDITONS
  48. * A TRIGGER VALUE IS GENERATED USED IN
  49. * CALLING NP$STPR.
  50. *
  51. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  52. * NP$NWL, NX$ACBX.
  53. *
  54. * 7. ROUTINES CALLED
  55. * NP$MSG - DAYFILE ILLEGAL TRIGGER RECEIVED.
  56. *
  57. * 8. DAYFILE MESSAGES
  58. * - "ILLEGAL TRIGGER RECEIVED"
  59. *
  60. #
  61.  
  62. #
  63. **** PROC NP$DATA - XREF LIST.
  64. #
  65. XREF # EXTERNAL REFERENCE PROCS #
  66. BEGIN
  67. PROC NP$STPR; # STATE TABLE PROCESSOR #
  68. PROC NP$MSG; # DAYFILE MESSAGE PASSER #
  69. PROC NP$CIO; # PROC FOR ISSUING CIO CALLS #
  70. END
  71. #
  72. ****
  73. #
  74. DEF ERTABLMT # 6 #; # LIMIT OF ERROR CODE TABLE #
  75. DEF PRDLMT # 28 #; # TABLE SIZE OF THE FOUR TABLES #
  76. DEF PRDSPLOWER # 1 #; # LOWER BOUND FOR PRU SENDER TABLE #
  77. DEF PRDSPUPPER # 4 #; # UPPER BOUND FOR PRU SENDER TABLE #
  78. DEF PRDRPLOWER # 8 #; # LOWER BOUND FOR PRU RECE'V TABLE #
  79. DEF PRDRPUPPER # 10 #; # UPPER BOUND FOR PRU RECE'V TABLE #
  80. DEF PRDSCLOWER # 15 #; # LOWER BOUND FOR CHAR SENDER TABLE #
  81. DEF PRDSCUPPER # 20 #; # UPPER BOUND FOR CHAR SENDER TABLE #
  82. DEF PRDRCLOWER # 22 #; # LOWER FOR CHAR RECEIVER TABLE #
  83. DEF PRDRCUPPER # 25 #; # UPPER BOUND FOR CHAR RECEIVER TAB #
  84. DEF ERTABNO # 5 #; # NUMBER OF TABLES FOR ERROR CODE - #
  85. # TRIGGER MATCH #
  86. ITEM CRNT$ORD; # CURRENT VALUE OF TABLE ORDINAL #
  87. ITEM CONTRIG; # CURRENT VALUE OF TRIGGER #
  88. ITEM LEVLOP B; # FLAG FOR EXITTING LOOP #
  89. ITEM INDEX; # LOOP INDEX #
  90. ITEM TABSELECT; # ERROR TABLE SELECTOR #
  91. ITEM BACKTRIG; # RETURN TRIGGER BY CALLING NP$STPR #
  92.  
  93. ARRAY ILLTRIG[0:0] S(3); # ILLEGAL TRIGGER #
  94. BEGIN
  95. ITEM ILLTRIGC C(00,00,24) = ["ILLEGAL TRIGGER RECEIVED"];
  96. ITEM ILLTRIGZ U(02,24,36) = [0];
  97. END
  98.  
  99. ARRAY ERBLK[0:0] S(3); # ERROR BLOCK #
  100. BEGIN
  101. ITEM ERBLKV C(00,00,21) = ["BLOCK TYPE NOT QMSG"];
  102. ITEM ERBLKZ U(02,06,54) = [0];
  103. END
  104.  
  105. BASED ARRAY ERR$TAB[0:0] S(1); # BASED ARRAY FOR ERROR CODE #
  106. BEGIN
  107. ITEM ERR$CODE U(00,00,32); # ERROR CODE #
  108. END
  109.  
  110. ARRAY PFCSFCTAB[1:PRDLMT] S(1); # PFCSFC TABLE FOR LEVEL 7 QMSG #
  111. BEGIN
  112. ITEM PFSFV U(00,00,16) = [ # START OF PRU SENDER LEVEL 7 QMSG #
  113. LEV7$ER, # ER(E) #
  114. LEV7$SR, # SR #
  115. LEV7$RR, # RR #
  116. , # ILLEGAL TRIGGER #
  117. ,
  118. ,
  119. ,
  120. # START OF PRU RECEIVER LEVEL 7 QMSG#
  121. LEV7$ES, # ES(E) #
  122. LEV7$SS, # SS #
  123. , # ILLEGAL TRIGGER #
  124. ,
  125. ,
  126. ,
  127. ,
  128. # START OF CHAR SENDER LEVEL 7 QMSG#
  129.  
  130. LEV7$SR, # SR #
  131. LEV7$RR, # RR #
  132. LEV7$ER, # ER #
  133. LEV7$QR, # QR #
  134. LEV7$MR, # MR #
  135. , # ILLEGAL TRIGGER #
  136. ,
  137. # START OF CHAR RECEIVER LEVEL 7 QMS#
  138. LEV7$SS, # SS #
  139. LEV7$ES, # ES #
  140. LEV7$MS, # MS #
  141. , # ILLEGAL TRIGGER #
  142. ,
  143. ,
  144. ];
  145.  
  146. ITEM PFSFTRIG U(00,30,30) = [
  147. # START OF PRU SENDER TRIGGER #
  148. NSPTERK, # ER(OK) #
  149. NSPTSR, # SR #
  150. NSPTRRT, # RR RECEIVED #
  151. NRSTILL, # ILLEGAL TRIGGER #
  152. ,
  153. ,
  154. ,
  155. # START OF PRU RECEIVER TRIGGER #
  156. NRPTESE, # ES(E) #
  157. NRPTSS, # SS #
  158. NRSTILL, # ILLEGAL TRIGGER #
  159. ,
  160. ,
  161. ,
  162. ,
  163. # START OF CHAR SENDER TRIGGER TABLE#
  164. NSCTSR, # SR #
  165. NSCTRRT, # RR #
  166. NSCTERK, # ER #
  167. NSCTQRE, # QR #
  168. NSCTMRR, # MR #
  169. NSCTILL, # ILLEGAL TRIGGER #
  170. ,
  171. # START OF CHAR RECEIVER TRIGGER TAB#
  172. NRCTSS, # SS #
  173. NRCTESE, # ES(E) #
  174. NRCTMSR, # MS #
  175. NRCTILL, # ILLEGAL TRIGGER #
  176. ,
  177. ,
  178. ];
  179. END # END OF PFCSFCTAB #
  180.  
  181. ARRAY ERTAB [1: ERTABLMT] S(1); # ERROR CODE TABLE FOR ER AND ES#
  182. BEGIN
  183. ITEM ERCODE U(00,00,32) = [
  184. PRDER1, # ER OR ES(OK) #
  185. PRDER2, # RETRYABLE RECEIVER ERROR #
  186. PRDER3, # NONRETRYABLE RECEIVE ERR #
  187. PRDER6, # RETRYABLE SENDER ERROR #
  188. PRDER7, # NON RETRYABLE SENDER ERR #
  189. # ILLEGAL ERROR CODE #
  190. ];
  191. END
  192.  
  193. ARRAY QRTAB [1: ERTABLMT] S(1); # ERROR CODE TABLE FOR QR #
  194. BEGIN
  195. ITEM QRCODE U(00,00,32) = [
  196. PRDER1, # NO ERROR #
  197. PRDER2, # RETRYABLE RECEIVE ERROR #
  198. PRDER3, # NONRETRYABLE RECEIVE ERR #
  199. PRDER4, # PROTOCOL ERROR #
  200. PRDER5, # GO NOT ACCEPTED #
  201. # ILLEGAL ERROR CODE #
  202. ];
  203. END
  204.  
  205. ARRAY PRDPTR [0:NETRCOD] S(1); # CONTROL BLOCK FOR INDEXES INTO #
  206. BEGIN # PFCSFC LEVEL 7 QMSG #
  207. ITEM PRDLOWER U(00,00,30) = [ PRDSPLOWER, # LOWER BOUND SEND #
  208. PRDRPLOWER, # LOWER BOUND PRU #
  209. # RECEIVE #
  210. PRDSCLOWER, # LOWER BOUND CHAR #
  211. # SEND #
  212. PRDRCLOWER # LOWER BOUND CHAR #
  213. # RECEIVE #
  214. ];
  215. ITEM PRDUPPER U(00,30,30) = [ PRDSPUPPER, # UPPER BOUND SEND #
  216. PRDRPUPPER, # UPPER BOUND PRU #
  217. # RECEIVE #
  218. PRDSCUPPER, # UPPER BOUND CHAR #
  219. # SEND #
  220. PRDRCUPPER # UPPER BOUND CHAR #
  221. # RECEIVE #
  222. ];
  223. END # END OF PRDPTR #
  224.  
  225. ARRAY ERRTRIG [1: ERTABLMT, 1 : ERTABNO] S(1);
  226. BEGIN
  227. ITEM ENTRV U(00,32,28) = [ # ER(E) AND PRU SENDER TABLE #
  228. [ NSPTERK, # ER(OK) #
  229. NSPTERE, # ER(E) WITH E=X20 #
  230. NSPTERE, # ER(E) WITH E=X21 #
  231. NSPTERE, # ER(E) WITH E=X28 #
  232. NSPTERE, # ER(E) WITH E=X29 #
  233. NRSTILL # ILLEGAL TRIGGER #
  234. ]
  235. # ER(E) AND CHARACTER SENDER TABLE #
  236. [ NSCTERK, # ER(OK) #
  237. NSCTERE, # ER(E) WITH E=X20 #
  238. NSCTERE, # ER(E) WITH E=X21 #
  239. NSCTERE, # ER(E) WITH E=X28 #
  240. NSCTERE, # ER(E) WITH E=X29 #
  241. NSCTILL # ILLEGAL TRIGGER #
  242. ]
  243. # ES(E) AND PRU RECEIVER TABLE #
  244. [ NRPTESE, # ES(OK) #
  245. NRPTESE, # ES(E) WITH E=X20 #
  246. NRPTESE, # ES(E) WITH E=X21 #
  247. NRPTESE, # ES(E) WITH E=X28 #
  248. NRPTESE, # ES(E) WITH E=X29 #
  249. NRSTILL # ILLEGAL TRIGGER #
  250. ]
  251. # ES(E) AND CHARACTER RECEIVER TABLE#
  252. [ NRCTESK, # ES(OK) #
  253. NRCTESE, # ES(E) WITH E=X20 #
  254. NRCTESE, # ES(E) WITH E=X21 #
  255. NRCTESE, # ES(E) WITH E=X28 #
  256. NRCTESE, # ES(E) WITH E=X29 #
  257. NRCTILL # ILLEGAL TRIGGER #
  258. ]
  259. # QR(E) AND CHARACTER SENDER TABLE #
  260. [ NSCTQRK, # QR(OK) #
  261. NSCTQRE, # QR(E) WITH E=X20 #
  262. NSCTQRE, # QR(E) WITH E=X21 #
  263. NSCTQRE, # QR(E) WITH E=X22 #
  264. NSCTQRE, # QR(E) WITH E= X23 #
  265. NSCTILL # ILLEGAL TRIGGER #
  266. ]
  267. ];
  268. END # END OF TABLE #
  269.  
  270. STATUS ERTABID NULL, # TABLE ID FOR SEARCHING ERROR CODE #
  271. TAB1, # ERROR CODE FOR ER AND PRU SENDER #
  272. TAB2, # ERROR CODE FOR ER AND CHAR SENDER #
  273. TAB3, # ERROR CODE FOR ES AND PRU RECEIVER#
  274. TAB4, # ERROR CODE FOR ES AND CHAR RECVER #
  275. TAB5; # ERROR CODE FOR QR AND CHAR SENDER #
  276.  
  277. CONTROL EJECT;
  278. PROC PRDCOPY;
  279. BEGIN
  280. #
  281. *1DC PRDCOPY
  282. *
  283. * 1. PROC NAME AUTHOR DATE
  284. * PRDCOPY Y. C. YIP 02/19/1985
  285. *
  286. * 2. FUNCTIONAL DESCRIPTION
  287. * PRDCOPY COPYIES CONTENT OF DATA RECEIVED THROUGH NETGETL
  288. * IN NETXFRC TO NET WORK BUFFER INDEXED BY FTTINDEX.
  289. *
  290. * 3. METHOD USED
  291. * FIRST, TEMPLATE FOR NETWORK BUFFER, FET$WORK IS PULLED
  292. * FET ADDRESS INDICATED BY FTTFETW[FTTINDEX].
  293. * SECOND, A LOCAL TEMPLATE, WORD IS SET TO THE FIRST WORD
  294. * ADDRESS OF THE NETWORK BUFFER INDEXED BY FTT.
  295. * A LOCAL INDEX, IN$ADR IS SET SUCH IT POINTS TO THE WORD
  296. * WHERE DATA FROM LOC$TA SHOULD BE STORED. IN$ADR IS NORMALLY
  297. * ONE GREATER THAN THE VALUE OF IN POINTER OF NETWORK BUFFER
  298. * EXCEPT FOR THE BOUNDARY CONDITION MENTIONED BELOW.
  299. * THEN THE WHOLE CHUNK OF DATA IN LOC$TA IS COPIED TO
  300. * THE NETWORK BUFFER USING THE TLC IN THE LOC$TA.
  301. * BOUNDARY CONDITIONS ARE:
  302. * IN POINTER IN NETWORK BUFFER FET IS EQUAL TO
  303. * OUT POINTER IN NETWORK BUFFER FET. IN THIS CASE,
  304. * IN$ADR IS SET TO VALUE OF IN POINTER.
  305. * ERROR CONDITION IS:
  306. * IN$ADR IS EQUAL TO LIMIT POINTER IN NETBUF FET.
  307. * IN THIS CASE, CONTRIG IS SET TO INTERNAL ERROR TRIGGER.
  308. *
  309. * 4. ENTRY CONDITIONS
  310. * CONTRIG IS ZEROED OUT.
  311. *
  312. * 5. EXIT CONDITONS
  313. * CONTRIG IS ASSIGNED TO ERROR TRIGGER SHOULD AN ERROR
  314. * OCCUR. DATA IS COPYIED FROM DATA$WORD TO NETBUF
  315. *
  316. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  317. *
  318. * 7. ROUTINES CALLED
  319. * -NONE
  320. * 8. DAYFILE MESSAGES
  321. * -NONE
  322. *
  323. #
  324. BASED ARRAY COPYAREA[0:0] S(1); # TEMPLATE FOR ADDRESSING #
  325. BEGIN # COPYING AREA #
  326. ITEM WORD U(00,00,60);
  327. END
  328. ITEM IN$ADR; # POINTER TO NETBUF AREA #
  329. ITEM INDEX; # LOOP INDEX #
  330. ITEM LOCTLC; # LENGTH OF TEXT TO BE COPIED #
  331. CONTROL EJECT;
  332. # #
  333. # CODE OF PRDCOPY BEGINS HERE #
  334. # #
  335. P<FET$WORK> = FTTFETW[FTTINDEX]; # PULL NETBUF TEMPLATE TO #
  336. # NETBUF ADDRESS IN THE FTT #
  337. P<COPYAREA> = 0; # SET COPYAREA TEMPLATE TO POINT TO #
  338. # 0 #
  339. P<FET$CIO> = FTTFETADR[FTTINDEX]; # SET DISK FET TEMPLATE TO #
  340. # MEMORY ADDRESS OF DISK FET #
  341. P<CMB> = FTTCMV$BLK[FTTINDEX]; # SET CMB TEMPLATE TO CHARACTER #
  342. # CONVERSION TABLE ADDRESS #
  343. P<HEADER> = LOC$HA; # PULL HEADER TEMPLATE TO HA #
  344. IF NOT FTTNOTRAN[FTTINDEX] # IF TRANSLATION NEEDED #
  345. THEN
  346. BEGIN
  347. IF ABHTLC NQ 0 # NON-ZERO ABHTLC #
  348. THEN
  349. BEGIN
  350. IN$ADR = FETWIN[0] + 1; # IN$ADR NOW POINTS TO INPOINTER + 1#
  351. IF FETWIN[0] EQ FETWOUT[0] # INITIAL CONDITION OF FET #
  352. THEN
  353. BEGIN
  354. IN$ADR = FETWIN[0]; # IN$ADR NOW IS THE SAME AS FETWIN #
  355. END
  356. LOCTLC = (ABHTLC*2 +14)/15;# COMPUTE LENGTH OF TEXT IN WORDS#
  357. WORD[IN$ADR] = DATA$WORD[0]; # COPY HEADER #
  358. FOR INDEX = 1 STEP 1 UNTIL LOCTLC
  359. DO
  360. BEGIN
  361. IN$ADR = IN$ADR + 1; # NEXT WORD #
  362. IF IN$ADR EQ FETWLIMIT[0] # IF IN POINTER EQ LIMIT POINTER#
  363. THEN
  364. BEGIN
  365. CONTRIG = NRCTITR; # SET CONTRIG TO INTERNAL ERROR #
  366. GOTO ENDCOPY; # RETURN WITHOUT FURTHER COPYING #
  367. END
  368. ELSE
  369. BEGIN
  370. WORD[IN$ADR] = DATA$WORD[INDEX]; # COPY WORD #
  371. END
  372. END # END OF FOR #
  373. FETWIN[0] = IN$ADR ; # UPDATE IN POINTER #
  374. END # END OF NON-ZERO ABHTLC #
  375. END # END OF TRANSLATION NEEDED #
  376. ELSE # TRANSLATION NOT NEEDED #
  377. BEGIN # FOR INTRAHOST BINARY #
  378. LOCTLC =(ABHTLC + 1 )*2/15 ; # GET NUMBER OF CM WORDS #
  379. # EXCLUDING THE ONE WORD TBH HEADER #
  380. IF LOCTLC GR 1 # IF NOT JUST THE TBH HEADER #
  381. THEN
  382. BEGIN
  383. FOR INDEX = 2 STEP 1 UNTIL LOCTLC# COPY DATA DIRECTLY TO CIO #
  384. # BUFFER #
  385. DO
  386. BEGIN
  387. IF FETIN[0] EQ FETOUT[0] - 1 # IF DISK BUFFER IS FULL #
  388. THEN
  389. BEGIN # RESET OUT PTR BY WRITING #
  390. NP$CIO(CIO$WRITE); # TO CIO BUFFER #
  391. END
  392. WORD[FETIN[0]] = DATA$WORD[INDEX];# COPY DATA TO DISK BUFF #
  393. FETIN[0] = FETIN[0] + 1; # BUMP IN POINTER OF DISK FET #
  394. IF FETIN[0] EQ FETLIM[0] # END OF BUFFER REACHED #
  395. THEN
  396. BEGIN
  397. FETIN[0] = FETFIR[0]; # RESET IN POINTER OF DISK BUFFER #
  398. END
  399. END
  400. END # END OF FOR LOOP #
  401. END # END OF IF #
  402. ENDCOPY: RETURN; # RETURN TO CALLER #
  403. END # END OF PROC PRDCOPY #
  404.  
  405. CONTROL EJECT;
  406. PROC PRDERR;
  407. BEGIN
  408. #
  409. *1DC PRDERR
  410. *
  411. * 1. PROC NAME AUTHOR DATE
  412. * PRDERR Y. C. YIP 02/19/1985
  413. *
  414. * 2. FUNCTIONAL DESCRIPTION
  415. * PRDERR CHECKS ERROR CODE FOR LEVEL 7 PFCSFC OF QR, ER
  416. * AND ES. IT THEN GENERATES THE VALUE OF THE TRIGGER
  417. * CORRESPONDING TO THESE ERROR CODES.
  418. *
  419. * 3. METHOD USED
  420. * FIRST,PFCSFC IS IDENTIFIED AND THE BASE ARRAY ERR$TAB IS
  421. * SET TO EITHER ERTAB OR QRTAB DEPENDING ON THE VALUE OF
  422. * TABSELECT. TABSELECT VALUE OF 1-4 WILL USE ERTAB AS
  423. * ERROR CODE TABLE WHEREAS VALUE OF 5 WILL USE QRTAB AS
  424. * THE ERROR CODE TABLE.
  425. * AFTER THE SEARCH, IF THE LOOP INDEX IS EQUAL TO THE
  426. * VALUE OF ERTABLMT, THE ERROR CODE RECEIVED IS ILLEGAL
  427. * ELSE, THE RIGHT TRIGGER IS PRODUCED BY INDEXING INTO
  428. * THE ARRAY ENTRV WITH INDEX OF THE ERROR TABLE AND THE
  429. * TABLE SELECTOR.
  430. *
  431. * 4. ENTRY CONDITIONS
  432. * TABSELECT - TABLE ORDINAL USED AS THE COLUMN SELECTOR
  433. * OF THE ENTRV ARRAY.
  434. *
  435. * 5. EXIT CONDITONS
  436. * CONTRIG IS UPDATED TO HAVE THE TRIGGER VALUE.
  437. *
  438. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  439. * NX$ACBX
  440. * 7. ROUTINES CALLED
  441. * NP$MSG - DAYFILE PROCESSOR
  442. *
  443. * 8. DAYFILE MESSAGES
  444. * -ILLEGAL TRIGGER RECEIVED
  445. *
  446. #
  447.  
  448. ITEM INDEX; # LOOP INDEX #
  449. ITEM CTEMP C(10);
  450. CONTROL EJECT;
  451. # #
  452. # PRDERR CODE BEGINS HERE #
  453. # #
  454.  
  455. IF TABSELECT EQ ERTABID"TAB5" # QR ERROR CODE TABLE IS USED #
  456. THEN
  457. BEGIN
  458. P<ERR$TAB> = LOC(QRTAB);
  459. END
  460. ELSE
  461. BEGIN
  462. P<ERR$TAB> = LOC(ERTAB); # ELSE ER AND ES ERROR TABLE IS USED#
  463. END
  464. ERR$CODE[ERTABLMT-1] = LV7$ERROR;# DEPOSIT ERROR CODE IN TABLE #
  465. LEVLOP = FALSE; # SET LEAVE LOOP FLAG TO FALSE #
  466. FOR INDEX = 0 STEP 1 WHILE NOT LEVLOP # SCAN TABLE #
  467. DO
  468. BEGIN
  469. IF ERR$CODE[INDEX] EQ LV7$ERROR # OF A MATCH IS FOUND #
  470. THEN
  471. BEGIN
  472. CONTRIG = ENTRV[INDEX + 1,TABSELECT]; # GET TRIGGER #
  473. LEVLOP = TRUE; # SET EXIT FLAG #
  474. IF INDEX EQ ERTABLMT - 1 # IF FOUND IN LAST ENTRY #
  475. THEN
  476. BEGIN
  477. NP$MSG(ILLTRIG,XFRDTYPE); # ILLEGAL TRIGGER RECEIVED #
  478. END
  479. END
  480. END
  481. RETURN; # RETURN TO CALLER #
  482. END # END OF PRDERR #
  483.  
  484.  
  485. CONTROL EJECT;
  486. # #
  487. # CODE OF NP$DATA BEGINS HERE #
  488. # #
  489. P<LV7$BASE> = LOC$TA; # PULL LEVEL 7 MESSAGE TEMPLATE #
  490. P<HEADER> = LOC$HA; # PULL BLOCK HEADER TEMPLATE OVER #
  491. CRNT$ORD = FTTSTORD[FTTINDEX];#ASSIGN CURRENT TABLE ORDINAL FROM #
  492. # COMMON BLOCK VARIABLE FTTINDEX #
  493. LEVLOP =FALSE; # CONTROL LOOP INITIALIZED TO FALSE #
  494. IF ABHABT EQ APMSG AND FTTSTORD[FTTINDEX] EQ NETRCOD
  495. THEN # IF MSG AND CHARACTER RECEIVER #
  496. BEGIN # THE TABLE ORDINAL IS CHAR RECEIVER#
  497. CONTRIG = 0; # ZERO OUT CONTRIG #
  498. IF FTTSTATE[FTTINDEX] EQ # ONLY COPY IF IN DATA STATE #
  499. NRCDATA
  500. THEN
  501. BEGIN
  502. PRDCOPY; # COPY DATA RECEIVED TO NETBUF #
  503. END
  504. IF CONTRIG EQ 0 # IF NO COPY ERROR #
  505. THEN
  506. BEGIN
  507. CONTRIG = NRCTDAT; # DATA TRIGGER #
  508. END
  509. END
  510. ELSE
  511. BEGIN
  512. IF ABHABT EQ APPBLK AND FTTSTORD[FTTINDEX] EQ NETRCOD
  513. THEN # IF BLOCK AND CHARACTER RECEIVER #
  514. BEGIN
  515. CONTRIG = 0; # ZERO OUT CONTRIG #
  516. IF FTTSTATE[FTTINDEX] EQ # COPY BLK ONLY IN DATA STATE #
  517. NRCDATA
  518. THEN
  519. BEGIN
  520. PRDCOPY; # COPY BLOCK TO NETBUF #
  521. END
  522. END
  523. ELSE
  524. BEGIN # MUST BE APPQMSG OR APPQBLK #
  525. PFSFV[PRDUPPER[CRNT$ORD]] = LV7$BPFC; # PUT PFC IN LAST SLOT#
  526. FOR INDEX = PRDLOWER[CRNT$ORD] STEP 1 WHILE NOT LEVLOP
  527. DO
  528. BEGIN
  529. IF LV7$BPFC EQ PFSFV[INDEX]
  530. THEN
  531. BEGIN
  532. CONTRIG = PFSFTRIG[INDEX] ; # ASSIGN TRIGGER VALUE #
  533. LEVLOP = TRUE;
  534. IF INDEX EQ PRDUPPER[CRNT$ORD]
  535. THEN
  536. BEGIN
  537. NP$MSG(ILLTRIG,XFRDTYPE); # ILLEGAL TRIGGER #
  538. END
  539. END
  540. END
  541. IF CONTRIG EQ NSPTERK AND CRNT$ORD EQ NETSPOD
  542. THEN
  543. BEGIN # ER(E) AND PRU SENDER #
  544. TABSELECT = ERTABID"TAB1"; # SET TABLE SELECTOR TO TABLE 1 #
  545. END
  546. ELSE
  547. BEGIN
  548. IF CONTRIG EQ NSCTERK AND CRNT$ORD EQ NETSCOD
  549. THEN
  550. BEGIN
  551. TABSELECT = ERTABID"TAB2"; # ER(E) AND CHARACTER SENDER #
  552. END
  553. ELSE
  554. BEGIN
  555. IF CONTRIG EQ NRPTESE AND CRNT$ORD EQ NETRPOD
  556. THEN
  557. BEGIN
  558. TABSELECT = ERTABID"TAB3"; # ES(E) AND PRU RECEIVER #
  559. END
  560. ELSE
  561. BEGIN
  562. IF CONTRIG EQ NRCTESE AND CRNT$ORD EQ NETRCOD
  563. THEN
  564. BEGIN
  565. TABSELECT = ERTABID"TAB4"; # ES(E) AND CHAR RECEIVER#
  566. END
  567. ELSE
  568. BEGIN
  569. IF CONTRIG EQ NSCTQRE AND CRNT$ORD EQ NETSCOD
  570. THEN
  571. BEGIN
  572. TABSELECT = ERTABID"TAB5";# QR(E) AND CHAR SENDER #
  573. END
  574. ELSE
  575. BEGIN
  576. TABSELECT = ERTABID"NULL";# NO TABLE SELECT NEEDED #
  577. END
  578. END
  579. END
  580. END
  581. END
  582. IF TABSELECT NQ ERTABID"NULL" # SCAN ERROR CODE TABLE #
  583. THEN
  584. BEGIN
  585. PRDERR; # UPDATE DD FIELD #
  586. END
  587. END
  588. END
  589. BACKTRIG = CONTRIG; # SET BACKTRIG TO CONTRIG #
  590. FOR INDEX = 0 WHILE BACKTRIG NQ NIL # REPEAT WHILE BACKTRIG IS #
  591. DO # NOT NULL #
  592. BEGIN
  593. CONTRIG = BACKTRIG; # SET CONTRIG TO BACKTRIG #
  594. NP$STPR(FTTINDEX,CONTRIG,BACKTRIG); # CALLS STATE TABLE PROCSS #
  595. END
  596. RETURN; # RETURN TO CALLER #
  597. END # END OF NP$DATA #
  598. TERM
  599. *ENDIF
  600.  
  601.  
cdc/nos2.source/nam5871/np_data.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator