User Tools

Site Tools


cdc:nos2.source:nam5871:csibxt

CSIBXT

Table Of Contents

  • [00006] PROC CSIBXT
  • [00007] CSIBXT - BUILD NCF CROSS REFERENCE TABLE.
  • [00011] BUILD NCF CROSS REFERENCE TABLES AND NPUCB TABLE.
  • [00040] PROC CSIIAP
  • [00045] PROC MESSAGE
  • [00046] PROC READ
  • [00047] PROC READW
  • [00048] PROC RECALL
  • [00049] PROC REWIND
  • [00050] PROC SKIPB
  • [00051] PROC SKIPEI
  • [00052] FUNC XCDD
  • [00057] PROC SSTAQE
  • [00058] PROC SSTATS
  • [00059] PROC SSTRTS

Source Code

CSIBXT.txt
  1. *DECK CSIBXT
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. USETEXT TXTCTCS
  6. PROC CSIBXT;
  7. # TITLE CSIBXT - BUILD NCF CROSS REFERENCE TABLE. #
  8.  
  9. BEGIN # CSIBXT #
  10. #
  11. ** CSIBXT - BUILD NCF CROSS REFERENCE TABLES AND NPUCB TABLE.
  12. *
  13. * A. LIM 81/10/16
  14. * C. BRION 82/06/04.
  15. * C. BRION 82/03/15.
  16. * C. BRION 82/04/23.
  17. *
  18. * THIS ROUTINE IS PART OF THE INITIALIZATION PROCESS FOR CS.
  19. * ITS JOB IS TO BUILD CROSS REFERENCE TABLE(S) FOR NCF RECORDS.
  20. * THE NPUCB MANAGED TABLE IS ALSO INITIAILIZED FROM THE NPU
  21. * CROSS REFERENCE TABLE OF THE NCF.
  22. *
  23. * PROC CSIBXT
  24. *
  25. * ENTRY NONE
  26. *
  27. * EXIT TABLE(S) BUILT.
  28. *
  29. #
  30.  
  31.  
  32.  
  33.  
  34.  
  35. #
  36. **** PROC CSIBXT XREF LIST
  37. #
  38. XREF
  39. BEGIN
  40. PROC CSIIAP; # INITIALIZATION ABORT PROCEDURE #
  41. #
  42. ** MACREL ROUTINES
  43. #
  44.  
  45. PROC MESSAGE; # SEND MESSAGE #
  46. PROC READ; # READ FILE TO CIO BUFFER #
  47. PROC READW; # READ DATA TO WORKING BUFF #
  48. PROC RECALL; # RETURN CONTROL WHEN COMPLETE#
  49. PROC REWIND; # REWIND A FILE #
  50. PROC SKIPB; # SKIP RECORDS BACKWARD #
  51. PROC SKIPEI; # SKIP TO EOI #
  52. FUNC XCDD ; # CHAR CONVERSION #
  53. #
  54. ** END MACREL ROUTINES
  55. #
  56.  
  57. PROC SSTAQE; # ACCEPT A QUEUE ENTRY #
  58. PROC SSTATS; # ALLOCATES TABLE SPACE #
  59. PROC SSTRTS; # RELEASES TABLE SPACE #
  60. END
  61.  
  62. #
  63. ****
  64. #
  65.  
  66. *CALL NAMLEV
  67.  
  68. # DEFS #
  69.  
  70. DEF DF$ # 0 #; # MESSAGE OPTION - DAYFILE #
  71. DEF KEYPR$ # 2 #; # NUMBER WORDS IN NCF KEY PR #
  72. DEF PTSIZ$ # 15 #; # PREFIX TABLE SIZE #
  73. DEF MXRECT$ # 6 #; # NUMBER RECORDS THAT #
  74. # NEED INITIALIZATION #
  75. DEF NCFRTYP$ # 7 #; # NUMBER NCF RECORDS - 1 #
  76.  
  77. DEF CSLEVL$ # 5 #; # LENGTH OF CS LEVEL MSG #
  78. DEF NCFBDTL$ # 6 #; # LENGTH OF NCF DATE AND TIME MSG #
  79. DEF NCFTITL$ # 9 #; # LENGTH OF NCF TITILE MSG #
  80.  
  81. #
  82. * STATUS LIST RIDSTAT.
  83. *
  84. * RIDSTAT INDICATES THE TYPES OF NCF RECORDS THAT ARE CURRENTLY
  85. * INITIALIZED INTO THE CS MANAGED TABLES AND CONTROL TABLES THAT
  86. * MUST BE READ INTO MEMORY IN ORDER TO SET UP THE APPROPRIATE
  87. * CONTROL STRUCTURES OF THE CS PROGRAM.
  88. *
  89. #
  90.  
  91. STATUS RIDSTAT
  92. LIREC, # LINE RECORD INDEX #
  93. LLXREC, # LOG LINK XREF #
  94. PHXREC, # PHYSICAL LINK XREF #
  95. NPXREC, # NPU XREF #
  96. LIXREC, # LINE XREF #
  97. DEXREC, # DEVICE XREF #
  98. NOXREC; # DUMMY NO MATCH ENTRY #
  99.  
  100. # ITEMS #
  101.  
  102. ITEM DBVAR; # DEBUG VARIABLE #
  103. ITEM ADDR U; # ADDRESS CELL FOR TABLE LOC #
  104. ITEM M,K U; # LOOP VARS #
  105. ITEM ADDR1 U; # ADDRESS VARIABLE #
  106. ITEM INDXLEN U; # INDEX LENGTH VAR #
  107. ITEM FOUND B; # EXIT LOOP FLAG #
  108. ITEM I U; # INDUCTION VARIABLES #
  109. ITEM N U;
  110. ITEM J U;
  111. ITEM STATS U; # READW RETURN STATUS #
  112. ITEM TKEYPR U; # NUMBER OF NCF KEY PAIRS #
  113. ITEM WC U; # WORD COUNT FOR TABLE ALLOC #
  114. ITEM WCTH U; # WCTH TABLE WORD FOR LINE #
  115. # INDEX TABLE INITIALIZATION #
  116. ITEM SAVEADR I; # TEMP USED TO SAVE RANDOM ADR#
  117. ITEM SIZE U; # WORKING VAR #
  118.  
  119. # END ITEMS #
  120.  
  121. #
  122. * SWITCH BLDTAB - SWITCH FOR BUILDING TABLES LOGIC.
  123. #
  124.  
  125. SWITCH BLDTAB:RIDSTAT # USING RIDSTAT STATUS LIST #
  126. BLDLIR:LIREC, # BLD LINE RECORD INDEX #
  127. BLDLLX:LLXREC, # BLD LOG LINK XREF TABLE #
  128. BLDPHX:PHXREC, # BLD PHY LINK XREF TABLE #
  129. BLDNPX:NPXREC, # BLD NPU XREF AND NPUCBS #
  130. BLDLIX:LIXREC, # BLD LINE XREF TABLE #
  131. BLDDEX:DEXREC; # BLD DEVICE XREF TABLE #
  132.  
  133. #
  134. * DUMMY - DUMMY BASED ARRAY
  135. *
  136. * DUMMY IS A ARRAY USED TO STORE AN ADDRESS INTO THE PARAMETER LIST.
  137. #
  138.  
  139. BASED ARRAY DUMMY[00:00] S(1);;
  140.  
  141.  
  142. #
  143. * NCFMSG - NCF MESSAGE ARRAY
  144. *
  145. * NVFMSG CONTAINS THE FOLLOWING MESSAGE TO BE SENT TO SYSTEM DAYFILE
  146. * LOCAL DAYFILE, AND A AND B DISPLAY.
  147. #
  148.  
  149. ARRAY NCFMSG[00:00] S(1);
  150. BEGIN
  151. ITEM N$MSG C(00,00,08) = ["BAD NCF."];
  152. ITEM N$ZERO U(00,48,12) = [0];
  153. END
  154.  
  155. #
  156. * NCFINDX - NCF INDEX RECORD ARRAY.
  157. *
  158. * NCFINDX IS AN ARRAY THAT WILL CONTAIN THE NCF INDEX RECORD.
  159. * THE INDEX RECORD CONTAINS A TWO WORD ENTRY PER RECORD THAT
  160. * IS WRITTEN TO THE NCF.
  161. #
  162.  
  163. BASED ARRAY NCFINDX [00:00] S(2);
  164. BEGIN
  165. ITEM NCF$WORD U(00,00,60); # FULL WORD REFERENCE #
  166. ITEM NCF$RT C(00,00,02); # RECORD TYPE #
  167. ITEM NCF$RL U(01,00,30); # LENGTH OF RECORD #
  168. ITEM NCF$RADDR U(01,30,30); # RELETIVE PRU ADDR OF REC #
  169. END
  170.  
  171. #
  172. * NCFWBF - NCF WORKING BUFFER.
  173. *
  174. * NCFWBF IS A WORKING BUFFER FOR THE NCF. IT IS USED TO READ THE
  175. * NCF PREFIX AND INDEX RECORDS INTO CS. REFER TO THE NDL ERS,
  176. * APPENDIX F FOR DEFINITION.
  177. #
  178.  
  179. ARRAY NCFWBF [00:00] S(PTSIZ$);
  180. BEGIN
  181. ITEM NC$FLAG B(01,47,01); # NCF GOOD/BAD FLAG #
  182. ITEM NC$WC U(01,48,12); # WORD CNT FOR INDEX RECORD #
  183. ITEM NC$RT C(00,00,02); # RECORD TYPE #
  184. ITEM NC$RNAME C(00,00,07); # RECORD NAME #
  185. ITEM NC$RL U(01,00,30); # RECORD LENGTH INCL NAME #
  186. ITEM NC$RANINDX U(01,30,30); # RELETIVE PRU ADDR #
  187. ITEM NC$VER C(02,00,20); # NCF DATE/TIME #
  188. ITEM NC$DATE C(02,00,10); # NCF CREATION DATE #
  189. ITEM NC$TIME C(03,00,10); # NCF CREATION TIME #
  190. ITEM NC$LEV C(05,42,18); # NCF VERSION LEVEL #
  191. ITEM NC$TITLE C(08,00,50); # TITLE- TRUNCATED TO 50 CHARS #
  192. END
  193.  
  194. #
  195. * RECARAY - RECORD TYPE ARRAY.
  196. *
  197. * RECARAY IS AN ARRAY THAT CONTAINS THE RECORD TYPE IDENTIFIERS TO
  198. * BE USED FOR INITIALIZING THE CS CONTROL STRUCTURES. THE RECORD
  199. * TYPES FOR THE LINE RECORD INDEX (LI), THE LOGICAL LINK XREF
  200. * TABLE (LL), THE PHYSICAL LINK XREF TABLE (PH) AND THE NPU XREF
  201. * TABLE (NX) ARE PHYSICALLY LOCATED IN THIS ARRAY FOR USE IN LO-
  202. * CATING THE APPROPRIATE TABLES FROM THE NCF.
  203. #
  204.  
  205. ARRAY RECARAY [00:MXRECT$] S(1);
  206. BEGIN
  207. ITEM REC$TYPE C(00,00,02) = ["LI","LL","PH","NX","LX","DX"];
  208. ITEM REC$END B(00,59,01) =
  209. [FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE];
  210. END
  211.  
  212. #
  213. * MISSMSG - NCF MISSING RECORD MESSAGE.
  214. *
  215. * MISSMSG CONTAINS A MESSAGE TO BE USED IF A RECORD TYPE AS DEFINED
  216. * IN THE RECARAY IS NOT LOCATED. CS WILL BE ABORTED IN THIS CASE.
  217. #
  218.  
  219. ARRAY MISSMSG [00:00] S(2);
  220. BEGIN
  221. ITEM MIS$MSG C(00,00,18) = ["MISSING NCF RECORD"];
  222. ITEM MIS$ZERO U(00,48,12) = [0];
  223. END
  224.  
  225. #
  226. * BADREAD - NCF BAD READ MESSAGE.
  227. *
  228. * BADREAD CONTAINS A MESSAGE TO BE USED IF A BAD READ STATUS IS
  229. * ENCOUNTERED DURING CSIBXT INITIALIZATION. CS WILL ABORT.
  230. #
  231.  
  232. ARRAY BADREAD [00:00] S(2);
  233. BEGIN
  234. ITEM BAD$MSG C(00,00,12) = ["BAD NCF READ"];
  235. ITEM BAD$ZERO U(01,12,48) = [0];
  236. END
  237.  
  238. #
  239. * BNAMLEV - BASED ARRAY FOR NAM LEVEL MESSAGE BUFFER.
  240. #
  241.  
  242. BASED ARRAY BNAMLEV[00:00] S(2);
  243. BEGIN
  244. ITEM BNL$VER C(00,54,03);
  245. ITEM BNL$LEV C(01,30,03);
  246. END
  247.  
  248. #
  249. * CSLEV - CS VERSION AND LEVEL BUFFER.
  250. #
  251.  
  252. ARRAY CSLEV[00:00] S(CSLEVL$);
  253. BEGIN
  254. ITEM CLV$WORD0 U(00,00,60) = [0];
  255. ITEM CLV$PSFC U(00,00,16) = [HOPLG];
  256. ITEM CLV$MSG C(01,00,35) =
  257. ["CS/ HH.MM.SS. VER VER - LVL."];
  258. ITEM CLV$TIM C(02,00,10);
  259. ITEM CLV$VER C(03,30,03);
  260. ITEM CLV$LVL C(04,06,03);
  261. ITEM CLV$ZRO U(04,30,30) = [0];
  262. END
  263.  
  264. #
  265. * NCFBDT - NCF BUILD DATE AND TIME BUFFER.
  266. #
  267.  
  268. ARRAY NCFBDT[00:00] S(NCFBDTL$);
  269. BEGIN
  270. ITEM NBT$WORD0 U(00,00,60) = [0];
  271. ITEM NBT$PSFC U(00,00,16) = [HOPLG];
  272. ITEM NBT$MSG C(01,00,44) =
  273. ["CS/ HH.MM.SS. NCF YY/MM/DD, HH.MM.SS."];
  274. ITEM NBT$TIM C(02,00,10);
  275. ITEM NBT$DATE C(03,30,08);
  276. ITEM NBT$TIME C(04,30,08);
  277. ITEM NBT$ZRO U(05,24,36) = [0];
  278. END
  279.  
  280. #
  281. * NCFTIT - NCF TITLE BUFFER.
  282. #
  283.  
  284. ARRAY NCFTIT[00:00] S(NCFTITL$);
  285. BEGIN
  286. ITEM NTL$WORD0 U(00,00,60) = [0];
  287. ITEM NTL$PSFC U(00,00,16) = [HOPLG];
  288. ITEM NTL$MSG C(01,00,21) =
  289. ["CS/ HH.MM.SS. "];
  290. ITEM NTL$TIM C(02,00,10);
  291. ITEM NTL$TITLE C(03,06,50);
  292. ITEM NTL$ZRO U(08,06,54) = [0];
  293. END
  294.  
  295.  
  296. CONTROL EJECT;
  297.  
  298.  
  299.  
  300. #
  301. * INITIALIZE THE NCF FET. DEFINITION IN TXTCTCS.
  302. #
  303.  
  304. NF$WORD[0] = 0;
  305. NF$LFN[0] = "NCF";
  306. NF$CBIT[0] = TRUE;
  307. NF$WORD1[0] = 0;
  308. NF$R[0] = TRUE;
  309. NF$L[0] = NFSIZ$ - 5;
  310. NF$FIRST[0] = LOC(NCFBUF);
  311. NF$IN[0] = LOC(NCFBUF);
  312. NF$OUT[0] = LOC(NCFBUF);
  313. NF$WORD4[0] = 0;
  314. NF$LIMIT[0] = NF$FIRST[0] + NBLIM$ + 1;
  315. NF$LA[0] = 0;
  316. NF$WORD6[0] = 0;
  317.  
  318.  
  319. #
  320. * READ HEADER RECORD FOR DATE, TIME AND TITLE.
  321. #
  322.  
  323. REWIND(NCFFET);
  324. READ(NCFFET);
  325. RECALL(NCFFET);
  326. READW(NCFFET,NCFWBF,PTSIZ$,STATS);
  327. $BEGIN
  328. IF STATS NQ 0
  329. THEN
  330. BEGIN
  331. MESSAGE(BADREAD[0],DF$);
  332. CSIIAP;
  333. END
  334. $END
  335.  
  336. #
  337. * SEND CS VERSION NUMBER AND THE NCF BUILD DATE AND TIME, AND
  338. * TITLE TO NAM DAYFILE.
  339. #
  340.  
  341. ABHWORD[0] = 0;
  342. ABHABT[0] = APPCMD;
  343. ABHACT[0] = CT60TRANS;
  344. WCB$WORD[0] = 0;
  345. WCB$SMID[0] = SMID"HOPLG";
  346.  
  347. P<BNAMLEV> = LOC(NAMLEV); # CS VERSION AND LVL MSG #
  348. CLV$TIM[0] = CTM$CLOCK[0];
  349. CLV$VER[0] = BNL$VER[0];
  350. CLV$LVL[0] = BNL$LEV[0];
  351. ABHTLC[0] = CSLEVL$;
  352. WCB$WC[0] = CSLEVL$ + 2;
  353. SSTAQE(P<OTQ>, WCBUF[0],ABHBUF[0], CSLEV[0]);
  354.  
  355. NBT$TIM[0] = CTM$CLOCK[0]; # NCF BUILD DATE AND TIME MSG #
  356. NBT$DATE[0] = NC$DATE[0];
  357. NBT$TIME[0] = NC$TIME[0];
  358. ABHTLC[0] = NCFBDTL$;
  359. WCB$WC[0] = NCFBDTL$ + 2;
  360. SSTAQE(P<OTQ>, WCBUF[0], ABHBUF[0], NCFBDT[0]);
  361.  
  362. NTL$TIM[0] = CTM$CLOCK[0]; # NCF TITLE MSG #
  363. NTL$TITLE[0] = NC$TITLE[0];
  364. ABHTLC[0] = NCFTITL$;
  365. WCB$WC[0] = NCFTITL$ + 2;
  366. SSTAQE(P<OTQ>, WCBUF[0], ABHBUF[0], NCFTIT[0]);
  367.  
  368. CSNCFVER = NC$VER[0]; # STORE DATE/TIME INTO CSCS #
  369. CSNCFLEV = NC$LEV[0];
  370. NF$IN[0] = NF$FIRST[0];
  371. NF$OUT[0] = NF$FIRST[0];
  372.  
  373. #
  374. * READ NCF PREFIX TABLE.
  375. #
  376.  
  377. SKIPEI(NCFFET);
  378. SKIPB(NCFFET,2);
  379. READ(NCFFET);
  380. RECALL(NCFFET);
  381. READW(NCFFET,NCFWBF,PTSIZ$,STATS);
  382. $BEGIN
  383. IF STATS NQ 0
  384. THEN
  385. BEGIN
  386. MESSAGE(BADREAD[0],DF$);
  387. CSIIAP;
  388. END
  389. $END
  390.  
  391. #
  392. * READ LFN, NCFWC WORDS.
  393. #
  394. READW(NCFFET,NCFWBF,KEYPR$,STATS);
  395. $BEGIN
  396. IF STATS NQ 0
  397. THEN
  398. BEGIN
  399. MESSAGE(BADREAD[0],DF$);
  400. CSIIAP;
  401. END
  402. $END
  403.  
  404. IF NOT NC$FLAG # BAD NCF FROM NDL? #
  405. THEN
  406. BEGIN
  407. MESSAGE(NCFMSG[0],DF$);
  408. CSIIAP;
  409. END
  410.  
  411. #
  412. * THE NCD FILE IS POSITIONED AT THE START OF THE INDEX
  413. * RECORD. THE LENGTH OF THE REMAINDER OF THE INDEX RECORD
  414. * IS CALCULATED AND THE RECORD IS THEN READ FROM THE NCF
  415. * INTO THE NCFINDX BASED ARRAY VIA THE USE OF A MANAGED
  416. * TABLE NOT YET IN USE BY CS. THE MANAGED TABLE USED WILL
  417. * BE RELEASED AFTER THE RECORD IS READ.
  418. *
  419. * THE LENGTH OF THE INDEX RECORD MINUS THE HEADER IS EQUAL TO THE
  420. * NUMBER OF RECORDS WRITTEN TO THE NCF MULTIPLIED BY 2. THEREFORE
  421. * THE NUMBER OF KEY RECORDS = LENGTH - HEADER / 2.
  422. #
  423.  
  424.  
  425. INDXLEN = NC$WC[0]; # CALCULATE THE LENGTH #
  426. SSTATS(P<OCB>,INDXLEN);
  427. ADDR = P<OCB>;
  428. P<NCFINDX> = ADDR;
  429. N = INDXLEN - 1; # REMOVE HEADER LENGTH #
  430. TKEYPR = N/2;
  431. READW(NCFFET,NCFINDX,N,STATS);
  432. $BEGIN
  433. IF STATS NQ 0
  434. THEN
  435. BEGIN
  436. MESSAGE(BADREAD[0],DF$);
  437. CSIIAP;
  438. END
  439. $END
  440. #
  441. * THE NCF INDEX RECORD MINUS HEADER RESIDES AT NCFINDX. FOR EACH
  442. * RECORD OF THE INDEX, CHECK AGAINST THE RECORD TYPES DEFINED BY
  443. * THE RECARAY ARRAY FOR A MATCH. A MATCH INDICATES THAT THE INDEX
  444. * RECORD IS ONE OF THE RECORDS NEEDED BY CS. A MATCH IS SECURE
  445. * SINCE THE INDEX RECORD TYPE IS STORED AS THE LAST ENTRY OF THE
  446. * RECARAY. THE END RECORD INDICATOR IS SET FOR THE LAST ENTRY OF
  447. * THE RECARAY ARRAY.
  448. #
  449.  
  450. #
  451. * THE OUTER LOOP CAUSES A SEARCH OF ALL INDEX RECORDS. THE END OF
  452. * THE INDEX RECORD ARRAY CONTAINS AN ENTRY WITH A ZZ RECORD TYPE.
  453. * REACHING THE POINT OF THE ZZ RECORD CAUSES EVERYTHING TO STOP.
  454. #
  455.  
  456. NCF$RL[TKEYPR] = 0;
  457. FOR I = 0 STEP 1 WHILE NCF$RT[I] NQ O"7700"
  458. DO
  459. BEGIN
  460. REC$TYPE[MXRECT$] = NCF$RT[I];
  461. FOR J = 0 STEP 1 WHILE NCF$RT[I] NQ REC$TYPE[J]
  462. DO
  463. BEGIN
  464. END
  465. IF NOT REC$END[J] # IF A MATCH FOUND #
  466. THEN
  467. BEGIN
  468.  
  469. #
  470. * AN INDEX RECORD NEEDED HAS BEEN FOUND. SET UP THE NCF FET,
  471. * RESET THE CIO BUFFER, AND SET THE RELETIVE PRU ADDRESS OF
  472. * THE NEEDED TABLE INTO THE FET.
  473. #
  474.  
  475. RECALL(NCFFET);
  476. WC = NCF$RL[I];
  477. N = WC - 2; # SET UP ACTUAL REC LEN #
  478. NF$RR[0] = NCF$RADDR[I];
  479. NF$IN[0] = NF$FIRST[0];
  480. NF$OUT[0] = NF$FIRST[0];
  481. SAVEADR = NCF$RADDR[I];
  482.  
  483. #
  484. * NOW READ THE HEADER OF THE RECORD AND DISCARD SINCE NOT NEEDED.
  485. #
  486.  
  487. READ(NCFFET);
  488. RECALL(NCFFET);
  489. READW(NCFFET,NCFWBF[0],KEYPR$,STATS);
  490. $BEGIN
  491. IF STATS NQ 0
  492. THEN
  493. BEGIN
  494. MESSAGE(BADREAD[0],DF$);
  495. CSIIAP;
  496. END
  497. $END
  498.  
  499. #
  500. * EACH CASE IS INVOKED DEPENDING ON THE RECORD TYPE MATCHED
  501. * AGAINST IN THE RECARAY ARRAY. THE SPECIFIC TABLE ON THE NCF
  502. * HAS BEEN READIED TO READ AND EACH CASE WILL APPROPRIATELY
  503. * READ THE TABLE INTO THE MANAGED TABLE.
  504. #
  505.  
  506. GOTO BLDTAB[J];
  507.  
  508.  
  509. BLDLIR: #** BUILD LINE RECORD INDEX **#
  510.  
  511. $BEGIN
  512. IF NC$RNAME[0] NQ "LNINDEX"
  513. THEN
  514. BEGIN
  515. MESSAGE(BADREAD,DF$);
  516. CSIIAP;
  517. END
  518. $END
  519. SSTATS(P<LRI>,WC);
  520. LIWORD[0] = 0;
  521. ADDR1 = P<LRI> + 1;
  522. P<DUMMY> = ADDR1;
  523. READW(NCFFET,DUMMY,N,STATS);
  524. WCTH = WC -1;
  525. LIWORD[WCTH] = -1; # INSURE SEARCH SUCCESSFUL #
  526. GOTO ENDBLD;
  527.  
  528. BLDLLX: #** BUILD LOGICAL LINK XREF TABLE **#
  529.  
  530. $BEGIN
  531. IF NC$RNAME[0] NQ "LOGLINK"
  532. THEN
  533. BEGIN
  534. MESSAGE(BADREAD,DF$);
  535. CSIIAP;
  536. END
  537. $END
  538. SSTATS(P<LLXRS>,WC);
  539. READW(NCFFET,LLXRS,N,STATS);
  540. GOTO ENDBLD;
  541.  
  542. BLDPHX: #** BUILD PHYSICAL LINK XREF TABLE **#
  543.  
  544. $BEGIN
  545. IF NC$RNAME[0] NQ "PHYLINK"
  546. THEN
  547. BEGIN
  548. MESSAGE(BADREAD,DF$);
  549. CSIIAP;
  550. END
  551. $END
  552. SSTATS(P<PLXREFS>,WC);
  553. READW(NCFFET,PLXREFS,N,STATS);
  554. GOTO ENDBLD;
  555.  
  556. BLDNPX: #** BUILD NPU XREF TABLE AND NPUCBS **#
  557.  
  558. $BEGIN
  559. IF NC$RNAME[0] NQ "NPUXREF"
  560. THEN
  561. BEGIN
  562. MESSAGE(BADREAD,DF$);
  563. CSIIAP;
  564. END
  565. $END
  566. SSTATS(P<NPXREF>,WC);
  567. READW(NCFFET,NPXREF,N,STATS);
  568. $BEGIN
  569. IF STATS NQ 0
  570. THEN
  571. BEGIN
  572. MESSAGE(BADREAD[0],DF$);
  573. CSIIAP;
  574. END
  575. $END
  576. CSNPCNT = N/2; # CALCULATE NUMBER OF NPUCBS #
  577. SIZE = (CSNPCNT * NPCBSZ$) + NPCBSZ$; # 1 EXTRA AT END #
  578. SSTATS(P<NPUCB>,SIZE);
  579. FOR M = 0 STEP 1 UNTIL (CSNPCNT - 1)
  580. DO
  581. BEGIN
  582. NPU$WORD[M] = 0; # CLEAR NPUCB ARRAY #
  583. NPU$WORD1[M] = 0;
  584. NPU$WORD2[M] = 0;
  585. NPU$WORD3[M] = 0;
  586. NPU$WORD4[M] = 0 ;
  587. NPU$WORD5[M] = 0 ;
  588. NPU$WORD6[M] = 0 ;
  589. NPU$WORD7[M] = 0 ;
  590. NPU$NAME[M] = NPX$NAME[M]; # INIT NPUCB ARRAY #
  591. NPU$NID[M] = NPX$NID[M];
  592. NPU$VAR[M] = NPX$VAR[M];
  593. NPU$CSUM[M] = NPX$CSUM[M];
  594. NPU$CNID[M] = XCDD(NPX$NID[M]); #CONVERT NODE ID #
  595. NPU$CP[M] = CSCP;
  596. NPU$BU[M] = CSBU;
  597. END
  598. NPU$WORD[CSNPCNT] = 0;
  599. NPU$WORD1[CSNPCNT] = 0;
  600. NPU$WORD2[CSNPCNT] = 0;
  601. NPU$WORD4[CSNPCNT] = 0 ;
  602. NPU$WORD5[CSNPCNT] = 0 ;
  603. NPU$WORD6[CSNPCNT] = 0 ;
  604. NPU$WORD7[CSNPCNT] = 0 ;
  605.  
  606.  
  607. SSTRTS(P<NPXREF>,0,WC); # RELEASE NPU XREF TABLE #
  608. GOTO ENDBLD;
  609.  
  610. BLDLIX: #** BUILD LINE CROSS REFERENCE TABLE **#
  611.  
  612. $BEGIN
  613. IF NC$RNAME[0] NQ "LNXREF"
  614. THEN
  615. BEGIN
  616. MESSAGE(BADREAD,DF$);
  617. CSIIAP;
  618. END
  619. $END
  620. SSTATS(P<LIXS>,WC);
  621. READW(NCFFET,LIXS,N,STATS);
  622. GOTO ENDBLD;
  623.  
  624. BLDDEX: #** BUILD DEVICE CROSS REFERENCE TABLE **#
  625.  
  626. $BEGIN
  627. IF NC$RNAME[0] NQ "DVXREF"
  628. THEN
  629. BEGIN
  630. MESSAGE(BADREAD,DF$);
  631. CSIIAP;
  632. END
  633. $END
  634. SSTATS(P<DEXS>,WC);
  635. READW(NCFFET,DEXS,N,STATS);
  636. GOTO ENDBLD;
  637.  
  638. ENDBLD: #** COMMON EXIT **#
  639.  
  640. ADDR = P<OCB>; # REBASE NCFINDX POINTER #
  641. P<NCFINDX> = ADDR;
  642.  
  643.  
  644. END # IF NOT REC$END #
  645.  
  646. $BEGIN
  647. IF STATS NQ 0 # BAD NCF READ ALONG WAY #
  648. THEN
  649. BEGIN
  650. MESSAGE(BADREAD[0],DF$);
  651. CSIIAP;
  652. END
  653. $END
  654.  
  655. END # FOR I LOOP #
  656.  
  657. SSTRTS(P<OCB>,0,INDXLEN); # RELEASE THE OCB USED SPACE#
  658. DBVAR = 1;
  659. V24FLAG = FALSE ; # CLEAR CCP 2.4 VERSION FLAG #
  660.  
  661. END # CSIBXT #
  662.  
  663. TERM
  664.  
cdc/nos2.source/nam5871/csibxt.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator