User Tools

Site Tools


plato:source:plaopl:backtwo

BACKTWO

Table Of Contents

  • [00010] BACKUPS DATA CRUNCH - PHASE TWO
  • [00012] BACKUPS DATA CRUNCH PHASE TWO
  • [00110] COMMON DATA
  • [00163] MAIN PROGRAM.
  • [00267] SUBROUTINES.
  • [00269] CKSTATS - CHECK FILE STATUS FOR BUSY
  • [00292] CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
  • [00304] CLRS - CLEAR SLOT ENTRY
  • [00311] CREM - CREATE NEW ENTRY
  • [00335] INIT - INITIALIZE PARAMETERS
  • [00373] INSM - INSERT SLOT INFO.
  • [00393] INTS - INITIATE SLOT
  • [00422] MVEI - MOVE OLD ENTRY
  • [00437] RDIN - READ INPUT FILE
  • [00509] RDMR - READ MERGE FILE
  • [00563] SETLA - SET LOOK ASIDE BUFFER TO ZERO
  • [00577] RDSLOT - READ PARAMETER, SLOT AND VSN TABLES
  • [00586] WRDMP - REWRITE DUMP DIRECTORY
  • [00625] WRPARAM - WRITE PARAMETER BLOCK AND REST OF S0BACKC
  • [00636] WRTO - WRITE OUTPUT
  • [00684] OUTPUT ERROR MESSAGES
  • [00686] NEWIOUT - OUTPUT NEW ACCOUNT, FILE, AND FIW
  • [00702] OLDIOUT - OUTPUT OLD ACCOUNT, FILE, AND FIW
  • [00718] NEWMOUT - OUTPUT NEW ACCOUNT, FILE, AND FIW
  • [00734] OLDMOUT - OUTPUT OLD ACCOUNT, FILE, AND FIW
  • [00763] END PROGRAM - MESSAGES - COMDECKS - BUFFERS
  • [00765] END - END PROGRAM.

Source Code

BACKTWO.txt
  1. BACKTWO
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK BACKTWO 00 000 81/04/29 11.24
  4. BACKTWO
  5. IDENT BACKTWO,BEGIN,BACKTWO
  6. ENTRY BACKTWO
  7. SYSCOM B1 DEFINE (B1) = 1
  8. *COMMENT BACKUPS DATA CRUNCH - PHASE TWO
  9. COMMENT COPYRIGHT CONTROL DATA CORP. 1980.
  10. TITLE BACKUPS DATA CRUNCH - PHASE TWO
  11. SPACE 4
  12. *** BACKTWO - BACKUPS DATA CRUNCH PHASE TWO
  13. * J. J. BUCHMANN. 80/01/15.
  14. *
  15. *FUNCTION;
  16. * THIS PROGRAM DOES THE SECOND PHASE OF THE BACKUPS
  17. * DATABASE MERGE PROCESS. THIS PROGRAM USES THE
  18. * PARAMETERS FILE, AND THE FILE DATA FROM BACKONE (AFTER
  19. * IT HAS BEEN SORTED BY SORT/MERGE) AND IT ATTACHES THE
  20. * DUMP DIRECTORY. IT THEN EXTRACTS THE CURRENT SLOT
  21. * VALUE FROM THE PARAMETERS FILE. THE DUMP DIRECTORY
  22. * AND THE SORT FILE INFORMATION FILE ARE THEN COMPARED
  23. * ENTRY BY ENTRY (THE ACOUNT NAME, FILE NAME, AND FILE
  24. * TYPE/SIZE ARE COMPARED). IF AN OLD ENTRY IN THE DUMP
  25. * DIRECTORY IS FOUND WITHOUT AN EQUIVALENT NEW ENTRY,
  26. * THEN THE CURRENT SLOT INFORMATION IS CLEARED; IF ALL
  27. * SLOT ARE EMPTY, THIS ENTRY IS DISCARDED, OTHERWISE IT
  28. * IS WRITTEN TO THE NEW DUMP DIRECTORY FILE. IF A NEW
  29. * ENTRY IS FOUND WITHOUT AN EQUIVALENT OLD ENTRY; A NEW
  30. * ENTRY IS CREATED WITH THE CURRENT SLOT INFORMATION.
  31. * IF AN OLD AND NEW ENTRY ARE FOUND TO BE EQUIVALENT,
  32. * THE A MERGED ENTRY WITH UPDATED SLOT INFORMATION IS
  33. * WRITTEN TO THE NEW DIRECTORY FILE. AS INFORMATION IS
  34. * WRITTEN TO THE DUMP DIRECTORY, A FIRST-LEVEL INDEX IS
  35. * CREATED IN A PORTION OF THE PARAMETERS FILE CALLED THE
  36. * LOOK-ASIDE BUFFER.
  37. *
  38. * AFTER ALL ENTRIES HAVE BEEN WRITTEN TO THE NEW DUMP
  39. * DIRECTORY FILE, THAT FILE IS REWOUND AND COPIED OVER
  40. * THE ORIGINAL, THE SLOT POINTER IS ADVANCED TO THE NEXT
  41. * SLOT, AND THE PARAMETERS FILE IS REWRITTEN.
  42. *
  43. *PARAMETERS; NONE
  44. *
  45. *INFORMATIVE MESSAGES;
  46. * MERGING
  47. * WRITING DUMP DIRECTORY
  48. * SLOT = NNNN (CURRENT SLOT VALUE)
  49. * NEW SLOT = NNNN (NEW SLOT VALUE FOR TOMORROWS DUMP)
  50. * NNNNN NULL ENTRIES IGNORED
  51. * NNNNN OLD ENTRIES WITH NO MATCH
  52. * NNNNN NEW ENTRIES WITH NO MATCH
  53. * NNNNN MERGED OLD AND NEW ENTRIES
  54. * NNNNN ENTRIES WRITTEN TO DISK
  55. * NNNNN ENTRIES PURGED
  56. * DIRECTORY MERGE COMPLETE
  57. *
  58. *ERROR MESSAGES;
  59. * SLOT NUMBER OUT OF RANGE(SLOT VALUE .GT. 30 OR .LT. 1)
  60. *
  61. *INTERNAL ERROR MESSAGES;
  62. * LOOK ASIDE BUFFER TOO SMALL
  63. *
  64. *INFORMATION PASSED INTO THE OUTPUT FILE;
  65. * INPUT RECORDS OUT OF ORDER
  66. * MERGE RECORDS OUT OF ORDER
  67. * DUPLICATE INPUT RECORDS
  68. * DUPLICATE MERGE RECORDS
  69. * /--- BLOCK BACKTWO 00 000 81/04/29 08.06
  70. SPACE 4
  71. *CALL COMCMAC
  72. *CALL COMCCMD
  73. SPACE 4
  74. **** ASSEMBLY CONSTANTS.
  75.  
  76. BLDI EQU 10 INPUT BUFFER LENGTH
  77. BLDO EQU 10 OUTPUT BUFFER LENGTH
  78. BLDM EQU 4 SORT INFO. BUFFER LENGTH
  79. IBUFL EQU 2001B IFILE BUFFER LENGTH
  80. OBUFL EQU 2001B OFILE BUFFER LENGTH
  81. MBUFL EQU 2001B MFILE BUFFER LENGTH
  82. SBUFL EQU 2001B SFILE BUFFER LENGTH
  83. DBUFL EQU 2000B DUMP BUFFER LENGTH
  84. DSHF EQU 42 SHIFT COUNT DUMP DIR. NAME INC.
  85.  
  86. BLKSZE EQU 320 BLOCK SIZE (WORDS) FOR S0BACKC
  87. MBPARM EQU 1 MAX NUM OF BLOCKS / PARAMETERS
  88. MBSLOT EQU 2 MAX NUM OF BLOCKS / SLOT TABLE
  89. MBLAB EQU 25 MAX NUM OF BLOCKS / LOOK ASIDE
  90. MBVSN EQU 25 MAX NUM OF BLOCKS / VSN TABLE
  91. MBALL EQU MBPARM+MBSLOT+MBLAB+MBVSN TOTAL NUM BLOCKS
  92.  
  93.  
  94. * OFFSETS WITHIN PARAMETER BLOCK
  95.  
  96.  
  97. PDATE EQU 0 LAST BACKUP DATE
  98. PTIME EQU 1 LAST BACKUP TIME
  99. PBASE EQU 2 DUMP DIRECTORY BASE NAME
  100. PDNUM EQU 3 NUMBER OF DATASETS IN DUMP DIR.
  101. PNREC EQU 4 NUMBER OF RECORDS IN DATASETS
  102. PLREC EQU 5 NUMBER OF RECORDS-LAST DATASET
  103. PLABW EQU 6 WORDS IN LOOK-ASIDE BUFFER
  104. PPAGE EQU 9 PAGE SIZE
  105.  
  106. REQPK EQU 50 REQUIRED PACK OFFSET IN PARAMS.
  107. * /--- BLOCK BACKTWO 00 000 81/05/07 06.50
  108. ****
  109.  
  110. TITLE COMMON DATA
  111. BEGIN BSS 0
  112.  
  113.  
  114. FETS BSS 0
  115.  
  116. I BSS 0
  117. BACKDIR RFILEB IBUF,IBUFL,(FET=13D),EPR
  118.  
  119. O BSS 0
  120. DUMPDIR RFILEB OBUF,OBUFL,(FET=13D),EPR
  121.  
  122. M BSS 0
  123. TAPE4 RFILEB MBUF,MBUFL,(FET=8D)
  124.  
  125. S BSS 0
  126. S0BACKC RFILEB SBUF,SBUFL,(FET=8D)
  127.  
  128. OUT BSS 0
  129. OUTPUT RFILEB OUTBUF,2001B
  130. SPACE 4
  131. * DATA WORDS
  132.  
  133.  
  134. USERI EQU 377773B USER INDEX FOR FILES
  135. PACK DATA 0 PACK NAME FOR ATTACHES
  136. DPER DATA 7LBACKDIR PERMANENT FILE FOR DUMP DIRECT.
  137. OPER DATA 7LDUMPDIR PERMANENT FILE FOR DUMP DIRECT.
  138.  
  139. COLD DATA 0 COUNT OF OLD FILES WITH NO NEW
  140. CNEW DATA 0 COUNT OF NEW FILES WITH NO OLD
  141. CMRG DATA 0 COUNT OF NEW FILES WITH AN OLD
  142. COUT DATA 0 COUNT OF ENTRIES WRITTEN
  143. CPRG DATA 0 COUNT OF ENTRIES PURGED
  144. CZRO DATA 0 COUNT OF ENTRIES IGNORED
  145. SLTN DATA 0 SLOT NUMBER
  146. SLOFF DATA 0 SLOT OFFSET IN BUFFER
  147. SLSHF DATA 0 SLOT SHIFT WITHIN WORD
  148. PAGE DATA 0 PAGE SIZE
  149. CPAG DATA 0 CURRENT NUMBER OF WORDS IN PAGE
  150. DREC DATA 500 RECORD SIZE FOR DUMP DIRECTORY
  151. DNAM DATA 0 BASE NAME FOR DUMP DIRECTORY
  152. DNUM DATA 0 NUMBER OF DUMP DIRECTORIES
  153. DNOR DATA 0 NUMBER OF RECORDS/THIS DATASET
  154. DNORA DATA 0 NUMBER OF RECORDS/ALL DATASETS
  155. DNORL DATA 0 NUMBER OF RECORDS/LAST DATASET
  156. CNOR DATA 0 CURRENT RECORD NUMBER
  157. CNUM DATA 0 CURRENT DATASET NUMBER
  158. LABINC DATA 0 LOOK ASIDE INCREMENT
  159. LABSZE VFD 60/MBLAB*BLKSZE LOOK ASIDE BUFFER SIZE
  160. OLDI DATA 0,0,0 OLD INPUT FILE PARAMS
  161. OLDM DATA 0,0,0 OLD MERGE FILE PARAMS
  162. * /--- BLOCK BACKTWO 00 000 81/04/02 08.27
  163. TITLE MAIN PROGRAM.
  164. *** BACKTWO
  165.  
  166.  
  167. BACKTWO SB1 1 (B1) = 1
  168. RJ INIT INITIALIZE
  169. RJ INTS INITIALIZE SLOT OFFSETS
  170. RJ SETLA ZERO LOOK ASIDE BUFFER
  171. MESSAGE MRGM
  172.  
  173. MRG1 RECALL I REWIND FILES
  174. REWIND I,R
  175. RECALL M
  176. REWIND M,R
  177. RECALL O
  178. REWIND O,R
  179. MRG2 READ I
  180. READ M
  181. MRG3 RJ RDIN READ INPUT ENTRY
  182. NZ X1,MRG9 IF EOR, EOF
  183. MRG4 RJ RDMR READ SORT ENTRY
  184. NZ X1,MRG12 IF EOR, EOF
  185. MRG5 SA1 BUFI FIRST WORD OF OLD DATA
  186. SA2 BUFM FIRST WORD OF NEW DATA
  187. IX7 X1-X2
  188. NG X7,MRG6 IF OLD .LT. NEW
  189. NZ X7,MRG7 IF OLD .GT. NEW
  190. SA1 A1+B1 NEXT WORD OF OLD
  191. SA2 A2+B1 NEXT WORD OF NEW
  192. IX7 X1-X2
  193. NG X7,MRG6 IF OLD .LT. NEW
  194. NZ X7,MRG7 IF OLD .GT. NEW
  195. SA1 A1+B1 NEXT WORD OF OLD
  196. SA2 A2+B1 NEXT WORD OF NEW
  197. MX3 30
  198. BX1 X3*X1 TOP 30 OF OLD
  199. BX2 X3*X2 TOP 30 OF NEW
  200. IX7 X1-X2
  201. PL X7,MRG7 IF OLD .GE. NEW
  202. *
  203. * OLD .LT. NEW - MOVE OLD ENTRY
  204. *
  205. MRG6 RJ MVEI MOVE OLD ENTRY
  206. RJ CLRS CLEAR SLOT
  207. RJ WRTO WRITE IT OUT
  208. SA1 COLD INCREMENT OLD
  209. SX7 X1+B1
  210. SA7 A1
  211. RJ RDIN READ NEXT ENTRY
  212. ZR X1,MRG5 IF NO EOR, EOF, ETC.
  213. EQ MRG10
  214.  
  215. MRG7 ZR X7,MRG8 IF OLD .EQ. NEW
  216. *
  217. * OLD .GT. NEW - CREATE NEW ENTRY
  218. *
  219. RJ CREM CREATE NEW ENTRY
  220. SA1 BUFM+3 GET VSN VALUE
  221. RJ INSM INSERT NEW SLOT
  222. RJ WRTO WRITE IT OUT
  223. SA1 CNEW INCREMENT NEW
  224. SX7 X1+B1
  225. SA7 A1
  226. EQ MRG4 GET NEXT NEW ENTRY
  227.  
  228. * /--- BLOCK BACKTWO 00 000 81/03/26 13.00
  229. *
  230. * OLD .EQ. NEW
  231. *
  232. MRG8 RJ MVEI MOVE OLD ENTRY
  233. SA1 BUFM+3 GET VSN VALUE
  234. RJ INSM INSERT SLOT
  235. RJ WRTO WRITE IT OUT
  236. SA1 CMRG INCREMENT MERGE COUNT
  237. SX7 X1+B1
  238. SA7 A1
  239. EQ MRG3 READ THE NEXT OLD/NEW ENTRIES
  240.  
  241. MRG9 RJ RDMR GET NEXT SORT ENTRY
  242. NZ X1,MRG13 IF EOR, EOF
  243. MRG10 RJ CREM CREATE NEW ENTRY
  244. SA1 BUFM+3 GET VSN VALUE
  245. RJ INSM INSERT SLOT
  246. RJ WRTO WRITE IT OUT
  247. SA1 CNEW INCREMENT NEW
  248. SX7 X1+B1
  249. SA7 A1
  250. EQ MRG9 GET NEXT ENTRY
  251.  
  252. MRG11 RJ RDIN GET NEXT ENTRY
  253. NZ X1,MRG13 IF EOR, EOF ETC.
  254. MRG12 RJ MVEI MOVE OLD ENTRY
  255. RJ CLRS CLEAR SLOT
  256. RJ WRTO WRITE IT OUT
  257. SA1 COLD INCREMENT OLD
  258. SX7 X1+B1
  259. SA7 A1
  260. EQ MRG11 GET NEXT ENTRY
  261.  
  262. MRG13 WRITER O,R
  263. WRITEF O,R
  264. EQ END
  265.  
  266. MRGM DIS ,*MERGING*
  267. TITLE SUBROUTINES.
  268. CKSTATS SPACE 4
  269. ** CKSTATS - CHECK FILE STATUS FOR BUSY
  270. * ROLLOUT FOR 64 SECONDS IF BUSY
  271. * ABORT IF ERROR
  272. *
  273. * ENTRY X1-FET STATUS WORD
  274. *
  275. * EXIT X2=0, NOT BUSY
  276.  
  277.  
  278. CKSTATS DATA 0 ENTRY/EXIT
  279. AX1 10
  280. MX7 -8
  281. BX2 -X7*X1 ISOLATE STATUS
  282. ZR X2,CKSTATS IF NOT BUSY AND NO ERROR
  283. SX2 X2-1
  284. NZ X2,ABORT ATTACH ERROR
  285. ROLLOUT CKSW
  286. SX2 1 BUSY STATUS
  287. EQ CKSTATS
  288.  
  289. CKSW DATA 7700000100B
  290. * /--- BLOCK BACKTWO 00 000 81/04/02 08.28
  291. CLREPR SPACE 4
  292. ** CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
  293. *
  294. * ENTRY A1/X1=FET+1 AND CONTENTS
  295.  
  296.  
  297. CLREPR DATA 0 ENTRY/EXIT
  298. SX6 B1 MASK FOR EPR
  299. LX6 44
  300. BX6 -X6*X1
  301. SA6 A1
  302. EQ CLREPR
  303. CLRS SPACE 4
  304. ** CLRS - CLEAR SLOT ENTRY
  305.  
  306. CLRS DATA 0 ENTRY/EXIT
  307. SX1 B0 SET TO STORE A ZERO
  308. RJ INSM INSERT SLOT
  309. EQ CLRS EXIT
  310. CREM SPACE 4
  311. ** CREM - CREATE NEW ENTRY
  312. *
  313. * CREATE NEW ENTRY FROM MERGE DATA
  314. * SETS WRITE/CLEAR/INSERT POINTER TO NEW ENTRY
  315.  
  316.  
  317. CREM DATA 0 ENTRY/EXIT
  318. SB7 BLDO-1 ZERO OUTPUT WORKING BUFFER
  319. SX7 0
  320. CRE1 SA7 BUFO+B7
  321. SB7 B7-1
  322. PL B7,CRE1
  323. SA1 BUFM GET ACCOUNT NAME
  324. SA2 A1+B1 GET FILE NAME
  325. BX6 X1
  326. BX7 X2
  327. SA6 BUFO
  328. SA7 A6+B1
  329. SA1 A2+B1 GET FILE INFO. WORD.
  330. MX6 30 STORE UPPER 30 ONLY
  331. BX6 X6*X1
  332. SA6 A7+B1
  333. EQ CREM EXIT
  334. INIT SPACE 4
  335. ** INIT - INITIALIZE PARAMETERS
  336.  
  337.  
  338. INIT DATA 0 ENTRY/EXIT
  339. SETUI USERI SET USER INDEX
  340. PACKNAM PACK SET PACK NAME
  341. INIT1 ATTACH I,DPER,,,W
  342. SA1 I
  343. RJ CKSTATS
  344. NZ X2,INIT1 IF FILE WAS BUSY
  345. SA1 I+1
  346. RJ CLREPR CLEAR EPR
  347. INIT2 ATTACH O,OPER,,,W
  348. SA1 O
  349. RJ CKSTATS
  350. NZ X2,INIT2 IF FILE WAS BUSY
  351. SA1 O+1
  352. RJ CLREPR CLEAR EPR
  353. RJ RDPARAM READ PARAMETERS
  354. SA1 PARAM+PBASE DATABASE NAME
  355. SA2 PARAM+PDNUM NUMBER OF DATASETS
  356. BX6 X1
  357. BX7 X2
  358. SA6 DNAM
  359. SA7 DNUM
  360. SA1 PARAM+PNREC NUMBER OF RECORDS
  361. SA2 PARAM+PLREC NUMBER OF RECORDS(LAST DATASET)
  362. BX6 X1
  363. BX7 X2
  364. SA6 DNORA
  365. SA7 DNORL
  366. SA1 PARAM+PPAGE PAGE SIZE
  367. BX6 X1
  368. SA6 PAGE
  369. SA6 CPAG
  370. EQ INIT
  371. * /--- BLOCK BACKTWO 00 000 81/04/02 08.11
  372. INSM SPACE 4
  373. ** INSM - INSERT SLOT INFO.
  374. *
  375. * SETS SLOT INFO. INTO ENTRY
  376. *
  377. * X1 = INFO TO BE ADDED TO SLOT (0 WILL CLEAR)
  378.  
  379.  
  380. INSM DATA 0 ENTRY/EXIT
  381. SA2 SLOFF SLOT OFFSET
  382. SA2 X2+BUFO READWORD
  383. SA3 SLSHF SHIFT COUNT
  384. SX7 77777B MASK
  385. SB7 X3
  386. LX7 B7
  387. BX6 -X7*X2 MASK OUT OLD ENTRY
  388. LX1 B7 NEW DATA
  389. IX6 X6+X1
  390. SA6 A2 RESTORE
  391. EQ INSM EXIT
  392. INTS SPACE 4
  393. ** INTS - INITIATE SLOT
  394.  
  395. INTS DATA 0 ENTRY/EXIT
  396. SA1 SLOT GET SLOT POINTER
  397. SA1 SLOT+X1 GET SLOT NUMBER
  398. BX6 X1
  399. SA6 SLTN
  400. ZR X6,SLERR
  401. NG X6,SLERR
  402. SX6 X6-31
  403. PL X6,SLERR
  404. SX1 X1+9 OFFSET
  405. BX6 X1
  406. AX6 2 DIVIDE BY 4
  407. SA6 SLOFF BUFFER OFFSET
  408. LX6 2 MULTIPLY BY 4
  409. IX6 X1-X6 0 FOR TOP, 3 FOR BOTTOM
  410. SX7 3
  411. IX7 X7-X6 0 FOR BOTTOM, 3 FOR TOP
  412. BX6 X7
  413. LX6 4 *16
  414. IX6 X6-X7 *15
  415. SA6 SLSHF SLOT SHIFT COUNT
  416. SA1 SLTN
  417. RJ CDD
  418. SA6 SLMSG+1
  419. MESSAGE SLMSG OUTPUT SLOT MESSAGE
  420. EQ INTS
  421. MVEI SPACE 4
  422. ** MVEI - MOVE OLD ENTRY
  423. *
  424. * SETS WRITE/CLEAR/INSERT POINTER TO OLD ENTRY
  425.  
  426.  
  427. MVEI DATA 0 ENTRY/EXIT
  428. SB7 BLDO-1
  429. MVE1 SA1 BUFI+B7
  430. BX6 X1
  431. SB7 B7-B1
  432. SA6 BUFO+1+B7
  433. PL B7,MVE1
  434. EQ MVEI EXIT
  435. * /--- BLOCK BACKTWO 00 000 80/09/11 13.07
  436. RDIN SPACE 4
  437. ** RDIN - READ INPUT FILE
  438. *
  439. * TEST FOR REAL EOR, EOF
  440. * TEST FOR LOGICAL EOR, EOF (ACCOUNT AND FILE = -1)
  441. * SKIPS ZERO ENTRIES
  442. * TESTS FOR DUPLICATE ENTRIES OR OUT OF ORDER
  443. *
  444. * EXIT - X1=0, NO EOR, EOF
  445.  
  446.  
  447. RDIN DATA 0 ENTRY/EXIT
  448. RDIN1 READW I,BUFI,BLDI
  449. NZ X1,RDIN IF REAL EOR, EOF
  450. SA1 BUFI NEW ACCOUNT NAME
  451. SA2 A1+B1 NEW FILE NAME
  452. SA3 A2+B1 NEW FIW
  453. ZR X1,RDIN9
  454. RDIN2 SX6 B1
  455. IX7 X6+X1 SEE IF ACCOUNT NAME = -1
  456. ZR X7,RDIN8
  457. RDIN3 SA4 OLDI OLD ACCOUNT NAME
  458. SA5 A4+B1 OLD FILE NAME
  459. BX6 X1 NEW ACCOUNT NAME
  460. SA1 A5+B1 OLD FIW
  461. MX7 30
  462. BX3 X7*X3 MASK FIW
  463. IX7 X6-X4
  464. NZ X7,RDIN4 IF ACCOUNT NAMES NOT EQUAL
  465. IX7 X2-X5
  466. NZ X7,RDIN4 IF FILE NAMES NOT EQUAL
  467. IX7 X3-X1
  468. ZR X7,RDIN7 IF DUPLICATE ENTRIES
  469. RDIN4 NG X7,RDIN5 IF ENTRIES OUT OF ORDER
  470. SA6 A4 SAVE ACCOUNT, FILE, AND FIW
  471. BX7 X2
  472. SA7 A6+B1
  473. BX6 X3
  474. SA6 A7+B1
  475. MX1 0 NO EOR FLAG
  476. EQ RDIN
  477.  
  478. RDIN5 WRITEC OUT,RDIM1 ENTRIES OUT OF ORDER
  479. RJ OLDIOUT OUTPUT OLD INPUT ENTRIES
  480. RDIN6 RJ NEWIOUT OUTPUT NEW INPUT ENTRIES
  481. SA1 BUFI SAVE ACCOUNT, FILE, AND FIW
  482. SA2 A1+B1
  483. SA3 A2+B1
  484. MX4 30
  485. BX6 X1
  486. SA6 OLDI
  487. BX7 X2
  488. SA7 A6+B1
  489. BX6 X4*X3
  490. SA6 A7+B1
  491. MX1 0 NO EOR FLAG
  492. EQ RDIN
  493.  
  494. RDIN7 WRITEC OUT,RDIM2 DUPLICATE ENTRIES
  495. EQ RDIN6
  496.  
  497. RDIN8 IX7 X6+X2 SEE IF FILE NAME = -1
  498. NZ X7,RDIN3 CONTINUE PROCESSING
  499. SX1 B1 SET EOR FLAG
  500. EQ RDIN
  501.  
  502. RDIN9 NZ X2,RDIN2 IF FILE NAME .NE. 0
  503. SA1 CZRO INCREMENT ZERO COUNT
  504. SX6 X1+B1
  505. SA6 A1
  506. EQ RDIN1 READ ANOTHER RECORD
  507. * /--- BLOCK BACKTWO 00 000 81/03/26 11.41
  508. RDMR SPACE 4
  509. ** RDMR - READ MERGE FILE
  510. *
  511. * TEST FOR REAL EOR, EOF
  512. * TESTS FOR DUPLICATE ENTRIES OR OUT OF ORDER
  513. *
  514. * EXIT - X1=0, NO EOR, EOF
  515.  
  516.  
  517. RDMR DATA 0 ENTRY/EXIT
  518. READW M,BUFM,BLDM
  519. NZ X1,RDMR IF REAL EOR, EOF
  520. SA1 BUFM NEW ACCOUNT NAME
  521. SA2 A1+B1 NEW FILE NAME
  522. SA3 A2+B1 NEW FIW
  523. SA4 OLDM OLD ACCOUNT NAME
  524. SA5 A4+B1 OLD FILE NAME
  525. BX6 X1 NEW ACCOUNT NAME
  526. SA1 A5+B1 OLD FIW
  527. MX7 30
  528. BX3 X7*X3 MASK FIW
  529. IX7 X6-X4
  530. NZ X7,RDMR1 IF ACCOUNT NAMES NOT EQUAL
  531. IX7 X2-X5
  532. NZ X7,RDMR1 IF FILE NAMES NOT EQUAL
  533. IX7 X3-X1
  534. ZR X7,RDMR4 IF DUPLICATE ENTRIES
  535. RDMR1 NG X7,RDMR2 IF ENTRIES OUT OF ORDER
  536. SA6 A4 SAVE ACCOUNT, FILE, AND FIW
  537. BX7 X2
  538. SA7 A6+B1
  539. BX6 X3
  540. SA6 A7+B1
  541. MX1 0 NO EOR FLAG
  542. EQ RDMR
  543.  
  544. RDMR2 WRITEC OUT,RDMM1 ENTRIES OUT OF ORDER
  545. RJ OLDMOUT OUTPUT OLD MERGE ENTRIES
  546. RDMR3 RJ NEWMOUT OUTPUT NEW MERGE ENTRIES
  547. SA1 BUFM SAVE ACCOUNT, FILE, AND FIW
  548. SA2 A1+B1
  549. SA3 A2+B1
  550. MX4 30
  551. BX6 X1
  552. SA6 OLDM
  553. BX7 X2
  554. SA7 A6+B1
  555. BX6 X4*X3
  556. SA6 A7+B1
  557. MX1 0 NO EOR FLAG
  558. EQ RDMR
  559.  
  560. RDMR4 WRITEC OUT,RDMM2 DUPLICATE ENTRIES
  561. EQ RDMR3
  562. SETLA SPACE 4
  563. ** SETLA - SET LOOK ASIDE BUFFER TO ZERO
  564.  
  565.  
  566. SETLA DATA 0 ENTRY/EXIT
  567. SA1 LABSZE SIZE OF BUFFER
  568. SB6 LAB BEGINNING ADDRESS
  569. SB7 X1+LAB
  570. SX7 0
  571. SLA1 SA7 B6
  572. SB6 B6+B1
  573. LT B6,B7,SLA1
  574. EQ SETLA
  575. * /--- BLOCK BACKTWO 00 000 81/03/27 11.09
  576. RDPARAM SPACE 4
  577. ** RDSLOT - READ PARAMETER, SLOT AND VSN TABLES
  578.  
  579.  
  580. RDPARAM DATA 0 ENTRY/EXIT
  581. REWIND S,R
  582. READ S,R
  583. READW S,PARAM,MBALL*BLKSZE
  584. EQ RDPARAM
  585. WRDMP SPACE 4
  586. ** WRDMP - REWRITE DUMP DIRECTORY
  587.  
  588.  
  589. WRDMP DATA 0 ENTRY/EXIT
  590. MESSAGE WRDW
  591. REWIND O,R REWIND BOTH FILES
  592. REWIND I,R
  593. READ O,R INITIAL READ
  594. WRD1 READW O,DBUF,DBUFL READ A CHUNK
  595. NG X1,WRD3 IF EOF,EOI
  596. NZ X1,WRD2 IF EOR
  597. WRITEW I,DBUF,DBUFL WRITE A CHUNK
  598. EQ WRD1 GET ANOUTHER CHUNK
  599.  
  600. WRD2 SB7 B6-DBUF NUMBER OF WORDS TRANSFERED
  601. WRITEW I,DBUF,B7 WRITE CHUNK
  602. WRITER I,R WRITE EOR
  603. READ O,R READ NEXT RECORD
  604. EQ WRD1 GET NEXT CHUNK
  605.  
  606. WRD3 SB7 B6-DBUF NUMBER OF WORDS TRANSFERED
  607. BX5 X1 SAVE EOF/EOI STATUS
  608. WRITEW I,DBUF,B7 WRITE CHUNK
  609. SX5 X5+1 TEST STATUS
  610. NZ X5,WRD4 IF EOI
  611. WRITEF I,R WRITE EOF
  612. READ O,R READ NEXT RECORD
  613. EQ WRD1 GET NEXT CHUNK
  614.  
  615. WRD4 RECALL I WAIT FOR I/O TO COMPLETE
  616. SA1 I+2 TEST IN AND OUT
  617. SA2 A1+B1
  618. BX1 X1-X2
  619. ZR X1,WRDMP IF IN=OUT (EMPTY)
  620. WRITER I,R
  621. EQ WRDMP EXIT
  622.  
  623. WRDW DIS ,*WRITING DUMP DIRECTORY*
  624. WRPARAM SPACE 4
  625. ** WRPARAM - WRITE PARAMETER BLOCK AND REST OF S0BACKC
  626.  
  627.  
  628. WRPARAM DATA 0 ENTRY/EXIT
  629. REWIND S,R
  630. WRITEW S,PARAM,MBALL*BLKSZE
  631. WRITER S,R
  632. WRITEF S,R
  633. EQ WRPARAM EXIT
  634. * /--- BLOCK BACKTWO 00 000 81/03/27 10.39
  635. WRTO SPACE 4
  636. ** WRTO - WRITE OUTPUT
  637. *
  638. * WRITE THE OUTPUT ENTRY
  639. * INCREMENT OUTPUT COUNTER
  640.  
  641.  
  642. WRTO DATA 0 ENTRY/EXIT
  643. SB7 BLDO-4 CHECK FOR EMPTY ENTRY
  644. WRT1 SA1 BUFO+3+B7
  645. NZ X1,WRT2 IF NOT EMPTY
  646. SB7 B7-B1
  647. PL B7,WRT1
  648. SA1 A1-B1 GET LAST 30 BITS
  649. MX7 30
  650. BX7 -X7*X1
  651. NZ X7,WRT2
  652. SA1 CPRG INCREMENT PURGE COUNT
  653. SX7 X1+B1
  654. SA7 A1
  655. EQ WRTO EXIT
  656. WRT2 WRITEW O,BUFO,BLDO
  657. SA1 COUT INCREMENT OUTPUT COUNTER
  658. SX7 X1+B1
  659. SA7 A1
  660. SA1 CPAG INCREASE CURRENT PAGE COUNT
  661. SA2 PAGE MAX. NUMBER OF WORDS/PAGE
  662. SX6 X1+BLDO
  663. IX7 X1-X2
  664. SA6 A1
  665. NG X7,WRTO IF SAME PAGE
  666. IX6 X6-X2
  667. SA6 A1
  668. SA1 LABINC ADD INFO TO LOOK ASIDE BUFFER
  669. SB7 X1
  670. SA1 BUFO
  671. SA2 A1+B1
  672. BX6 X1
  673. BX7 X2
  674. SA6 LAB+B7
  675. SA7 A6+B1
  676. SX6 B7+2
  677. SA6 LABINC
  678. SA1 LABSZE COMPARE WITH MAXIMUM
  679. IX7 X1-X6
  680. PL X7,WRTO
  681. MESSAGE WRTE
  682. EQ ABORT
  683. * /--- BLOCK BACKTWO 00 000 81/03/27 10.31
  684. TITLE OUTPUT ERROR MESSAGES
  685. NEWIOUT SPACE 4
  686. ** NEWIOUT - OUTPUT NEW ACCOUNT, FILE, AND FIW
  687.  
  688.  
  689. NEWIOUT DATA 0
  690. SA1 BUFI
  691. RJ SFN
  692. SA6 RDIM4
  693. SA1 BUFI+1
  694. RJ SFN
  695. SA6 RDIM4+1
  696. SA1 BUFI+2
  697. RJ WOD
  698. SA6 RDIM4+2
  699. WRITEC OUT,RDIM3
  700. EQ NEWIOUT
  701. OLDIOUT SPACE 4
  702. ** OLDIOUT - OUTPUT OLD ACCOUNT, FILE, AND FIW
  703.  
  704.  
  705. OLDIOUT DATA 0
  706. SA1 OLDI
  707. RJ SFN
  708. SA6 RDIM6
  709. SA1 OLDI+1
  710. RJ SFN
  711. SA6 RDIM6+1
  712. SA1 OLDI+2
  713. RJ WOD
  714. SA6 RDIM6+2
  715. WRITEC OUT,RDIM5
  716. EQ OLDIOUT
  717. NEWMOUT SPACE 4
  718. ** NEWMOUT - OUTPUT NEW ACCOUNT, FILE, AND FIW
  719.  
  720.  
  721. NEWMOUT DATA 0
  722. SA1 BUFM
  723. RJ SFN
  724. SA6 RDIM4
  725. SA1 BUFM+1
  726. RJ SFN
  727. SA6 RDIM4+1
  728. SA1 BUFM+2
  729. RJ WOD
  730. SA6 RDIM4+2
  731. WRITEC OUT,RDIM3
  732. EQ NEWMOUT
  733. OLDMOUT SPACE 4
  734. ** OLDMOUT - OUTPUT OLD ACCOUNT, FILE, AND FIW
  735.  
  736.  
  737. OLDMOUT DATA 0
  738. SA1 OLDM
  739. RJ SFN
  740. SA6 RDIM6
  741. SA1 OLDM+1
  742. RJ SFN
  743. SA6 RDIM6+1
  744. SA1 OLDM+2
  745. RJ WOD
  746. SA6 RDIM6+2
  747. WRITEC OUT,RDIM5
  748. EQ OLDMOUT
  749. MESSAGE SPACE 4
  750. RDIM1 DIS ,* INPUT RECORDS OUT OF ORDER*
  751. RDIM2 DIS ,* DUPLICATE INPUT RECORDS*
  752. RDIM3 DATA 10H NEW ACCO
  753. DATA 10HUNT / FILE
  754. DATA 10H / FIW
  755. RDIM4 DATA 0,0,0,0
  756. RDIM5 DATA 10H OLD ACCO
  757. DATA 10HUNT / FILE
  758. DATA 10H / FIW
  759. RDIM6 DATA 0,0,0,0
  760. RDMM1 DIS ,* MERGE RECORDS OUT OF ORDER*
  761. RDMM2 DIS ,* DUPLICATE MERGE RECORDS*
  762. * /--- BLOCK BACKTWO 00 000 81/04/29 08.51
  763. TITLE END PROGRAM - MESSAGES - COMDECKS - BUFFERS
  764. END SPACE 4
  765. ** END - END PROGRAM.
  766.  
  767.  
  768. END BSS 0 END PROGRAM
  769. RJ WRDMP WRITE DUMP DIRECTORY
  770. SA1 SLOT INCREMENT SLOT POINTER
  771. SX6 X1+1
  772. SA2 X6+SLOT SEE IF END OF TABLE
  773. NZ X2,END0 IF OK
  774. SX6 1 START OVER
  775. SA2 SLOT+1
  776. END0 SA6 A1 REWRITE
  777. BX6 X2
  778. SA6 SLTN NEW SLOT NUMBER
  779. DATE PARAM+PDATE CURRENT DATE IN PARAMETER TABLE
  780. CLOCK PARAM+PTIME CURRENT TIME
  781. SA1 LABINC LOOK ASIDE BUFFER LENGTH
  782. BX6 X1
  783. SA6 PARAM+PLABW
  784. RJ WRPARAM REWITE PARAMETER BLOCK
  785. SA1 CZRO OUTPUT IGNORED ENTRIES
  786. RJ CDD
  787. SA6 CZROM
  788. SA1 COLD OUTPUT OLD WITH NO NEW
  789. RJ CDD
  790. SA6 COLDM
  791. SA1 CNEW OUTPUT NEW WITH NO OLD
  792. RJ CDD
  793. SA6 CNEWM
  794. SA1 CMRG OUTPUT MERGE COUNT
  795. RJ CDD
  796. SA6 CMRGM
  797. SA1 COUT OUTPUT WRITE COUNT
  798. RJ CDD
  799. SA6 COUTM
  800. SA1 CPRG OUTPUT PURGE COUNT
  801. RJ CDD
  802. SA6 CPRGM
  803. SA1 SLTN OUTPUT NEWSLOT NUMBER
  804. RJ CDD
  805. SA6 NEWSL+1
  806. MESSAGE CZROM OUTPUT IGNORED COUNT
  807. MESSAGE COLDM OUTPUT OLD COUNT
  808. MESSAGE CNEWM OUTPUT NEW COUNT
  809. MESSAGE CMRGM OUTPUT MERGE COUNT
  810. MESSAGE COUTM OUTPUT OUTPUT COUNT
  811. MESSAGE CPRGM OUTPUT PURGE COUNT
  812. MESSAGE NEWSL OUTPUT NEW SLOT NUMBER
  813. MESSAGE (=C* DIRECTORY MERGE COMPLETED*)
  814. END1 WRITER OUT,R
  815. ENDRUN
  816.  
  817. SLERR MESSAGE SMERR
  818. ABORT WRITER OUT,R
  819. ABORT
  820. * DERR1 MESSAGE DMERR1
  821. * EQ ABORT
  822. * /--- BLOCK BACKTWO 00 000 81/04/29 08.51
  823. SPACE 4
  824. ** MESSAGES
  825. *
  826.  
  827.  
  828. CZROM DATA 0
  829. DIS ,= NULL ENTRIES IGNORED.=
  830. COLDM DATA 0
  831. DIS ,= OLD ENTRIES WITH NO MATCH.=
  832. CNEWM DATA 0
  833. DIS ,= NEW ENTRIES WITH NO MATCH.=
  834. CMRGM DATA 0
  835. DIS ,= MERGED OLD AND NEW ENTRIES.=
  836. COUTM DATA 0
  837. DIS ,= ENTRIES WRITTEN TO DISK.=
  838. CPRGM DATA 0
  839. DIS ,= ENTRIES PURGED.=
  840. * SMSG DIS ,* SLOT TABLE TOO LONG*
  841. SMERR DIS ,* SLOT NUMBER OUT OF RANGE*
  842. * DMERR1 DIS ,* NOT ENOUGH DUMP DIRECTORY DATASETS*
  843. WRTE DIS ,* LOOK ASIDE BUFFER TOO SMALL*
  844. SLMSG DATA 10H SLOT =
  845. DATA 0
  846. DATA 0
  847. NEWSL DATA 10HNEW SLOT =
  848. DATA 0
  849. DATA 0
  850. SPACE 4
  851. * COMMON DECKS.
  852.  
  853.  
  854. *CALL COMCCIO
  855. *CALL COMCRDS
  856. *CALL COMCRDW
  857. *CALL COMCSYS
  858. *CALL COMCWTS
  859. *CALL COMCWTW
  860. *CALL COMCCDD
  861. *CALL COMCSFN
  862. *CALL COMCWOD
  863. *CALL COMCWTC
  864. SPACE 4
  865. ** BUFFERS.
  866.  
  867.  
  868. BUFFERS BSS 0
  869. TEMP BSS 1
  870. BUFI BSS BLDI
  871. BUFO BSS BLDO
  872. BUFM BSS BLDM
  873. IBUF BSS IBUFL
  874. OBUF BSS OBUFL
  875. MBUF BSS MBUFL
  876. SBUF BSS SBUFL
  877. OUTBUF BSS 2001B
  878. PARAM BSSZ MBPARM*BLKSZE PARAMETER TABLE
  879. SLOT BSSZ MBSLOT*BLKSZE SLOT TABLE
  880. LAB BSSZ MBLAB*BLKSZE LOOK ASIDE BUFFER
  881. VSN BSSZ MBVSN*BLKSZE VSN TABLE
  882.  
  883. DBUF BSSZ DBUFL DUMP BUFFER
  884. END BACKTWO
plato/source/plaopl/backtwo.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator