Table of Contents

BACKONE

Table Of Contents

  • [00010] BACKUPS DATA CRUNCH - PHASE ONE
  • [00012] BACKUPS DATA CRUNCH - PHASE ONE
  • [00093] COMMON DATA
  • [00135] MAIN PROGRAM.
  • [00288] SUBROUTINES
  • [00290] BUILDO - BUILD OUTPUT LINE
  • [00391] BUILDA - BUILT AUDIT ENTRY
  • [00414] CKALL - CHECK TO SEE IF ALL REQUIRED PACKS DUMPED
  • [00450] CKREQ - CHECK REQUIRED PACK TABLE
  • [00474] CKSTATS - CHECK FILE STATUS FOR BUSY
  • [00496] CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
  • [00508] INIT - INITIALIZE
  • [00556] CLRVSN - CLEAR VSN TABLE
  • [00581] GETAUT - GET AUDIT TRAIL
  • [00614] GETSL - GET SLOT ENTRY
  • [00638] RDSLOT - READ PARAMETER, SLOT AND VSN TABLES
  • [00648] WRAUDIT - REWRITE AUDIT TRAIL
  • [00687] WRPARAM - WRITE PARAMETER BLOCK AND REST OF S0BACKC
  • [00700] END PROGRAM
  • [00702] END - END PROGRAM.

Source Code

BACKONE.txt
  1. BACKONE
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK BACKONE 00 000 81/04/29 11.21
  4. BACKONE
  5. IDENT BACKONE,BEGIN,BACKONE
  6. ENTRY BACKONE
  7. SYSCOM B1 DEFINE (B1) = 1
  8. *COMMENT BACKUPS DATA CRUNCH - PHASE ONE
  9. COMMENT COPYRIGHT CONTROL DATA CORP. 1980.
  10. TITLE BACKUPS DATA CRUNCH - PHASE ONE
  11. SPACE 4
  12. *** BACKONE - BACKUPS DATA CRUNCH - PHASE ONE
  13. * J. J. BUCHMANN. 80/01/15.
  14. *
  15. *FUNCTION;
  16. * THIS PROGRAM DOES THE FIRST PHASE OF THE BACKUPS
  17. * DATABASE MERGE PROCESS. THIS PROGRAM ATTACHES THE
  18. * COMMUNICATIONS BUFFER, AUDIT TRAIL, AND PARAMETERS
  19. * FILE. IT THEN EXTRACTS THE CURRENT SLOT VALUE FROM
  20. * THE PARAMETERS FILE, CLEARS THE VSN TABLE OF ALL
  21. * ENTRIES USING THIS SLOT, CLEARS THE AUDIT TRAIL OF ALL
  22. * ENTRIES USING THIS SLOT, AND THEN READS THE
  23. * COMMUNICATIONS BUFFER. EACH RECORD ON THE
  24. * COMMUNICATIONS BUFFER CONTAINS A RECORD FOR EACH
  25. * MASTERFILE THAT HAS BEEN DUMPED. AS EACH RECORD IS
  26. * READ, THE AUDIT TRAIL BE UP UPDATED TO REFLECT THIS
  27. * MASTERFILE, THE VSN TABLE WILL BE UPDATED TO REFLECT
  28. * THIS VSN, AND AN ADDITIONAL FILE WILL GET A SHORT
  29. * ENTRY WITH INFORMATION CONCERNING ACCOUNT NAME, FILE
  30. * NAME, FILE TYPE/SIZE, AND VSN. THIS ENTRY IS ALSO
  31. * CHECKED AGAINST THE REQUIRED PACKS TAPE IN THE BACKUP
  32. * PARAMETERS FILE TO SEE THAT ALL FILES WERE DUMPED
  33. * CORRECTLY. AFTER ALL RECORDS ON THE COMMUNICATIONS
  34. * BUFFER HAVE BEEN PROCESSED WITHOUT ERROR, THE AUDIT
  35. * TRAIL AND PARAMETERS FILES ARE REWRITTEN WITH THE NEW
  36. * INFORMATION.
  37. *
  38. *PARAMETERS; NONE
  39. *
  40. *INFORMATIVE MESSAGES;
  41. * SLOT = NNNN (CURRENT SLOT VALUE)
  42. * WRITE AUDIT TRAIL
  43. * WRITE S0BACKC (PARAMETERS FILE)
  44. * MMMMMM NNN FILES FOUND (MMMMMM=MASTERFILE NAME)
  45. * NNNNNN TOTAL FILES
  46. *
  47. * MMMMMMMMMM - REQUIRED MF NOT DUMPED
  48. * MMMMMMMMMM - MF DUMPED MORE THAN ONCE
  49. * SLOT NUMBER OUT OF RANGE
  50. * VVVVVV REUSED OLD SLOT = NN (VSN VVVVVV WAS PREVIOUSLY
  51. * ASSIGNED TO SLOT NN)
  52. *
  53. *INTERNAL ERROR MESSAGES;
  54. * EXTRA WORDS IN COMM. BUFFER
  55. * EARLY END OF FILE IN COM. BUFFER.
  56. * NO ROOM FOR NEW VSN IN VSN TABLE
  57. *
  58. *INFORMATION PASSED INTO THE OUTPUT FILE;
  59. * OLD AUDIT INFORMATION (THESE ENTRIES REMOVED FROM THE
  60. * AUDIT TRAIL)
  61. * NEW AUDIT ENTRY (THESE ENTRIES ADDED)
  62. * /--- BLOCK BACKONE 00 000 81/05/07 06.50
  63. SPACE 4
  64. *CALL COMCMAC
  65. *CALL COMCCMD
  66. SPACE 4
  67. **** ASSEMBLY CONSTANTS.
  68.  
  69. BUFL EQU 150 WORKING BUFFER LENGTH
  70. BLDH EQU 6 HEADER BUFFER LENGTH
  71. BLDI EQU 3 INFO. BUFFER LENGTH
  72. BLDO EQU 4 SORT INFO. BUFFER LENGTH
  73. BLDA EQU 3 AUDIT TRAIL ENTRY LENGTH
  74. IBUFL EQU 2001B IFILE BUFFER LENGTH
  75. OBUFL EQU 2001B OFILE BUFFER LENGTH
  76. ABUFL EQU 2001B AFILE BUFFER LENGTH
  77. SBUFL EQU 2001B SFILE BUFFER LENGTH
  78. XBUFL EQU 2001B XFILE BUFFER LENGTH
  79. OUTBUFL EQU 2001B OUTPUT BUFFER LENGTH
  80.  
  81. BLKSZE EQU 320 BLOCK SIZE (WORDS) FOR S0BACKC
  82. MBPARM EQU 1 MAX NUM OF BLOCKS / PARAMETERS
  83. MBSLOT EQU 2 MAX NUM OF BLOCKS / SLOT TABLE
  84. MBLAB EQU 25 MAX NUM OF BLOCKS / LOOK ASIDE
  85. MBVSN EQU 25 MAX NUM OF BLOCKS / VSN TABLE
  86. MBALL EQU MBPARM+MBSLOT+MBLAB+MBVSN TOTAL NUM BLOCKS
  87.  
  88. REQPK EQU 50 REQUIRED PACK OFFSET IN PARAMS.
  89.  
  90.  
  91. ****
  92.  
  93. TITLE COMMON DATA
  94. BEGIN BSS 0
  95.  
  96.  
  97. FETS BSS 0
  98.  
  99. I BSS 0
  100. COMBUF RFILEB IBUF,IBUFL,(FET=13D),EPR
  101.  
  102. O BSS 0
  103. TAPE3 RFILEB OBUF,OBUFL,(FET=8D)
  104.  
  105. A BSS 0
  106. AUDIT RFILEB ABUF,ABUFL,(FET=13D),EPR
  107.  
  108. S BSS 0
  109. S0BACKC RFILEB SBUF,SBUFL,(FET=13D),EPR
  110.  
  111. X BSS 0
  112. AUDITX RFILEB XBUF,XBUFL,(FET=13D),EPR
  113.  
  114. OUT BSS 0
  115. OUTPUT RFILEB OUTBUF,OUTBUFL,(FET=8D)
  116. SPACE 4
  117. * DATA WORDS
  118. NFILE DATA 0 NUMBER OF FILES
  119. SLV DATA 0 SLOT VALUE
  120. VSV DATA 0 VSN ORDINAL
  121. VSNL VFD 60/MBVSN*BLKSZE VSN TABLE SIZE
  122. MASF DATA 0 MASTER FILE NAME
  123. CFILE DATA 0 CURRENT FILE NUMBER
  124. TFILE DATA 0 TOTAL FILES
  125. *
  126. * PERMANENT FILE PARAMETERS
  127. *
  128. USERI EQU 377773B USER INDEX FOR FILES
  129. PACK DATA 0 PACK NAME FOR ATTACHES
  130. CPER DATA 6LCOMBUF PERMANENT FILE FOR COMBUF
  131. APER DATA 5LAUDIT PERMANENT FILE FOR AUDIT
  132. SPER DATA 7LS0BACKC PERMANENT FILE FOR PARAMETERS
  133. XPER DATA 6LAUDITX PERMANENT FILE FOR AUDITX
  134. * /--- BLOCK BACKONE 00 000 81/03/25 10.58
  135. TITLE MAIN PROGRAM.
  136. *** BACKONE
  137.  
  138.  
  139. BACKONE SB1 1 (B1) = 1
  140. RJ INIT INITIALIZE AND GET ARGS
  141. RJ RDPARAM READ PARAMS/SLOT/VSN TABLES
  142. RJ GETSL GET CURRENT SLOT NUMBER
  143. RJ CLRVSN CLEAR CURRENT VSN
  144. RJ GETAUT GET AUDIT TRAIL
  145.  
  146. WRITEC OUT,CMSG BLANK LINE
  147. WRITEC OUT,NEWA WRITE TITLES FOR OUTPUT
  148. WRITEC OUT,LINE1
  149. WRITEC OUT,LINE2
  150.  
  151. CNV1 RECALL I REWIND ALL FILES
  152. REWIND I,R
  153. RECALL O
  154. CNV2 READ I
  155. CNV3 READW I,BUFH,BLDH
  156. NZ X1,CNVX IF EOR, EOF, EOI
  157. SA1 BUFH+1 NUMBER OF FILES
  158. SX6 X1-1 SUBTRACT DIRECTORY FROM COUNT
  159. SA2 BUFH MASTERFILE
  160. SA6 NFILE
  161. BX7 X2
  162. SA7 MASF
  163. SA1 BUFH+4 VSN
  164. SA2 VSNL NUMBER OF VSN ENTRIES
  165. AX2 1 / 2
  166. SB7 X2
  167. SB6 B0
  168. SB4 B0
  169. MX7 42
  170. CNV3A SB6 B6+B1
  171. GT B6,B7,CNVW NO VSN MATCH
  172. SB5 B6+B6
  173. SA2 VSN-1+B5
  174. BX6 X7*X2 MASK VSN/PACKNAME
  175. ZR X6,CNVV IF OPEN ENTRY
  176. IX5 X6-X1
  177. NZ X5,CNV3A NO MATCH WITH THIS ENTRY
  178. CNV3B SA3 BUFH+5 DATE/TIME
  179. IX6 X6+X3
  180. SA6 A2 REWRITE VSN ENTRY
  181. SX6 B6
  182. SA6 VSV VSN VALUE
  183. MX7 0
  184. SA7 CFILE CURRENT FILE
  185. SA1 A2-B1 GET FIRST WORD
  186. MX7 1 SET BIT
  187. LX7 12 POSITION TO BIT 11 (NEW FORMAT)
  188. BX1 X1+X7 SET NEW FORMAT BIT
  189. MX7 -11
  190. BX6 -X7*X1 ISOLATE OLD SLOT
  191. SA2 SLV NEW SLOT VALUE
  192. BX7 X7*X1 REST OF WORD
  193. IX7 X7+X2 NEW VSN ENTRY
  194. SA7 A1
  195. ZR X6,CNV3C IF NO OLD SLOT
  196. IX7 X2-X6
  197. ZR X7,CNV3C IF OLD AND NEW SLOT AGREE
  198. BX1 X6 CONVERT OLD SLOT
  199. RJ CDD
  200. SA6 REUSEX
  201. SA1 BUFH+4 VSN
  202. RJ SFN
  203. SA6 REUSE
  204. MESSAGE REUSE OUTPUT ERROR MESSAGE
  205. CNV3C RJ BUILDA BUILD AUDIT TRAIL
  206. RJ BUILDO BUILD OUTPUT
  207. RJ CKREQ CHECK REQUIRED PACK TABLE
  208. * /--- BLOCK BACKONE 00 000 81/03/30 08.18
  209. CNV4 SA1 CFILE
  210. SA2 NFILE
  211. SX7 X1+B1 INCREMENT CURRENT FILE NUMBER
  212. SA7 A1
  213. IX7 X2-X7
  214. NG X7,CNVY IF NO MORE FILES
  215. READW I,BUFH,BLDI READ NEXT FILE DATA
  216. NZ X1,CNVZ IF EOR
  217. SA1 VSV
  218. BX6 X1
  219. SA6 BUFH+3
  220. SA1 A6-B1 SHIFT FIW INFO TO TOP 24 BITS
  221. MX7 12 AND REORDER
  222. LX1 24
  223. BX6 X7*X1 EXTRACT TYPE/PART
  224. LX1 36
  225. LX7 48
  226. BX1 X7*X1 EXTRACT RMTS/NDIR
  227. IX6 X6+X1
  228. SA6 A1
  229. SA1 BUFH MASK TOP CHARACTERS OF ACCOUNT
  230. MX7 42
  231. BX6 X7*X1
  232. SA6 A1
  233. WRITEW O,BUFH,BLDO WRITE SORT DATA
  234. EQ CNV4
  235.  
  236. CNVV NZ B4,CNV3A IF WE ALLREADY HAVE NEW ENTRY
  237. SB4 B6+ SAVE ORDINAL FOR LATER USE
  238. EQ CNV3A
  239.  
  240. CNVW ZR B4,CNVW1 IF NO OPEN ENTRY
  241. SB6 B4 ORDINAL OF OPEN ENTRY
  242. SB5 B6+B6 OFFSET IN TABLE
  243. SA2 VSN-1+B5
  244. BX6 X1 VSN
  245. EQ CNV3B CREATE NEW ENTRY
  246.  
  247. CNVW1 MESSAGE NOVSM
  248. EQ ABORT
  249.  
  250. CNVX BSS 0 FINISH OFF SORT FILE
  251. WRITER O,R
  252. WRITEF O
  253. WRITER X,R AUDIT TRAIL
  254. WRITER OUT
  255. RJ CKALL CK. IF ALL REQUIRED PACKS DONE
  256. SA1 TFILE OUTPUT TOTAL NUMBER OF FILES
  257. RJ CDD
  258. SA6 ALLDONE
  259. MESSAGE ALLDONE
  260. RJ WRPARAM WRITE PARAM/SLOT/VSN TABLE BACK
  261. RJ WRAUDIT REWRITE AUDIT TRAIL
  262. EQ END
  263.  
  264. CNVY SA1 MASF END OF MASTER FILE
  265. RJ SFN
  266. SA6 MSG
  267. SA1 CFILE
  268. SX1 X1-1 REAL COUNT OF FILES
  269. SA2 TFILE
  270. IX6 X1+X2
  271. SA6 A2 TOTAL FILES
  272. RJ CDD
  273. SA6 MSG+1
  274. MESSAGE MSG
  275.  
  276. CNVG READW I,BUFH,BLDI
  277. NZ X1,CNV2
  278. MESSAGE (=C* EXTRA WORDS IN COMM. BUFFER*)
  279. EQ ABORT
  280.  
  281. CNVZ BSS 0
  282. SA1 MASF INSERT MASTER FILE NAME
  283. RJ SFN
  284. SA6 EOFM
  285. MESSAGE EOFM EARLY EOF MESSAGE
  286. EQ ABORT
  287. * /--- BLOCK BACKONE 00 000 80/10/27 09.38
  288. TITLE SUBROUTINES
  289. BUILDO SPACE 4
  290. ** BUILDO - BUILD OUTPUT LINE
  291. *
  292. * AUDIT INFO IN BUFA
  293. * BUILDS OUTPUT LINE FOR PRINTER IN BUILD
  294.  
  295. BUILDO DATA 0 ENTRY/EXIT
  296. SA1 BUFA MASTER FILE NAME
  297. MX7 42
  298. BX1 X7*X1
  299. RJ SFN
  300. LX6 54
  301. SA6 BUILD
  302. SA1 BUFA+1 PACKNAME
  303. MX7 42
  304. BX1 X7*X1
  305. RJ SFN
  306. SA6 BUILD+1
  307. SA1 BUFA NUMBER OF FILES
  308. SX1 X1
  309. RJ CDD
  310. MX7 -24
  311. BX6 -X7*X6
  312. LX6 36
  313. SA6 BUILD+2
  314. SA1 BUFA+1 SLOT NUMBER
  315. MX7 -7
  316. BX1 -X7*X1
  317. RJ CDD
  318. SA1 BUILD+2
  319. LX6 6
  320. MX7 -36
  321. BX6 -X7*X6
  322. IX6 X6+X1
  323. SA6 A1
  324. SA1 BUFA+2 VSN/PACK
  325. MX7 6 IF TAPE, ADD *
  326. BX7 X7*X1
  327. NZ X7,BUI1
  328. SX7 1R*
  329. LX7 54
  330. BX1 X1+X7
  331. BUI1 MX7 42
  332. BX1 X7*X1
  333. RJ SFN
  334. SA6 BUILD+3
  335. SA1 BUFA+1 EST
  336. MX7 -6
  337. AX1 7
  338. BX1 -X7*X1
  339. RJ WOD
  340. MX6 -12
  341. SA1 BUILD+3
  342. BX7 -X6*X7
  343. BX1 X6*X1
  344. IX6 X7+X1
  345. SA6 A1
  346. SA1 BUFA+2 YEAR
  347. AX1 14
  348. MX7 -4
  349. BX1 -X7*X1
  350. SX1 X1+80
  351. RJ CDD
  352. MX7 -18
  353. BX6 -X7*X6
  354. LX6 42
  355. SA6 BUILD+4
  356. SA1 BUFA+2 MONTH
  357. AX1 10
  358. MX7 -4
  359. BX1 -X7*X1
  360. RJ CDD
  361. SA1 BUILD+4
  362. MX7 -18
  363. BX6 -X7*X6
  364. LX6 24
  365. IX6 X6+X1
  366. SA6 A1
  367. SA1 BUFA+2 DAY
  368. AX1 5
  369. MX7 -5
  370. BX1 -X7*X1
  371. RJ CDD
  372. SA1 BUILD+4
  373. LX6 6
  374. MX7 -24
  375. BX6 -X7*X6
  376. IX6 X6+X1
  377. SA6 A1
  378. SA1 BUFA+2 HOUR
  379. MX7 -5
  380. BX1 -X7*X1
  381. RJ CDD
  382. LX6 6
  383. MX7 -18
  384. BX6 -X7*X6
  385. LX6 42
  386. SA6 BUILD+5
  387. WRITEC OUT,BUILD
  388. EQ BUILDO
  389. * /--- BLOCK BACKONE 00 000 80/09/19 12.54
  390. BUILDA SPACE 4
  391. ** BUILDA - BUILT AUDIT ENTRY
  392. *
  393. * BUFH - CONTAINS INFO FROM COPYMF
  394.  
  395. BUILDA DATA 0
  396. SA1 BUFH MASTER FILE NAME
  397. SA2 NFILE NUMBER OF FILES
  398. IX6 X1+X2
  399. SA6 BUFA
  400. SA1 BUFH+2 PACK NAME
  401. SA3 SLV SLOT VALUE
  402. SA2 A1+B1 EST
  403. LX2 7
  404. IX6 X2+X1
  405. IX6 X6+X3
  406. SA6 A6+B1
  407. SA1 A2+B1 VSN
  408. SA2 A1+B1 DATE
  409. IX6 X2+X1
  410. SA6 A6+B1
  411. WRITEW X,BUFA,BLDA WRITE TO NEW AUDIT FILE
  412. EQ BUILDA
  413. CKALL SPACE 4
  414. ** CKALL - CHECK TO SEE IF ALL REQUIRED PACKS DUMPED
  415.  
  416.  
  417. CKALL DATA 0 ENTRY/EXIT
  418. SB6 REQPK REQUIRED PACK OFFSET
  419. SB7 BLKSZE END OF REQUIRED PACKS
  420. MX7 42
  421. SB5 PARAM
  422. CKA1 SA1 B5+B6 GET RQUIRED PACK ENTRY
  423. ZR X1,CKA2 IF NULL ENTRY
  424. BX6 -X7*X1
  425. ZR X6,CKA3 IF DUMP FLAG NOT SET
  426. SX6 X6-1
  427. NZ X6,CKA4 IF DUMPED MORE THAN ONCE
  428. BX6 X7*X1 RESTORE ORIGINAL NAME
  429. SA6 A1
  430. CKA2 SB6 B6+1
  431. LT B6,B7,CKA1 IF MORE ENTRIES
  432. EQ CKALL ALL DONE
  433.  
  434. CKA3 RJ SFN OUTPUT ERROR MESSAGE
  435. SA6 CKAM
  436. MESSAGE CKAM
  437. EQ ABORT
  438.  
  439. CKA4 BX1 X7*X1 MASK NAME
  440. RJ SFN OUTPUT ERROR MESSAGE
  441. SA6 CKAM1
  442. MESSAGE CKAM1
  443. EQ ABORT
  444.  
  445. CKAM DATA 0 MASTER FILE NAME
  446. DIS ,* - REQUIRED MF NOT DUMPED*
  447. CKAM1 DATA 0 MASTER FILE NAME
  448. DIS ,* - MF DUMPED MORE THAN ONCE*
  449. CKREQ SPACE 4
  450. ** CKREQ - CHECK REQUIRED PACK TABLE
  451. *
  452. * SET FLAG IF CURRENT MASTER FILE THERE
  453.  
  454.  
  455. CKREQ DATA 0 ENTRY/EXIT
  456. SB6 REQPK REQUIRE PACK OFFSET
  457. SB7 BLKSZE END OF TABLE
  458. SA2 MASF MASTER FILE NAME
  459. SX6 B1
  460. MX7 42
  461. CKR1 SA1 PARAM+B6 GET CURRENT ENTRY
  462. BX5 X7*X1
  463. IX5 X2-X5
  464. ZR X5,CKR2 IF MATCH
  465. SB6 B6+1
  466. LT B6,B7,CKR1 IF MORE ENTRIES
  467. EQ CKREQ ALL DONE
  468.  
  469. CKR2 IX6 X6+X1 SET DUMPED FLAG
  470. SA6 A1
  471. EQ CKREQ ALL DONE
  472. * /--- BLOCK BACKONE 00 000 81/04/29 08.49
  473. CKSTATS SPACE 4
  474. ** CKSTATS - CHECK FILE STATUS FOR BUSY
  475. * ROLLOUT FOR 64 SECONDS IF BUSY
  476. * ABORT IF ERROR
  477. *
  478. * ENTRY X1-FET STATUS WORD
  479. *
  480. * EXIT X2=0, NOT BUSY
  481.  
  482.  
  483. CKSTATS DATA 0 ENTRY/EXIT
  484. AX1 10
  485. MX7 -8
  486. BX2 -X7*X1 ISOLATE STATUS
  487. ZR X2,CKSTATS IF NOT BUSY AND NO ERROR
  488. SX2 X2-1
  489. NZ X2,ABORT ATTACH ERROR
  490. ROLLOUT CKSW
  491. SX2 1 BUSY STATUS
  492. EQ CKSTATS
  493.  
  494. CKSW DATA 7700000100B
  495. CLREPR SPACE 4
  496. ** CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
  497. *
  498. * ENTRY A1/X1=FET+1 AND CONTENTS
  499.  
  500.  
  501. CLREPR DATA 0 ENTRY/EXIT
  502. SX6 B1 MASK FOR EPR
  503. LX6 44
  504. BX6 -X6*X1
  505. SA6 A1
  506. EQ CLREPR
  507. INIT SPACE 4
  508. ** INIT - INITIALIZE
  509.  
  510.  
  511. INIT DATA 0 ENTRY/EXIT
  512. *
  513. * GET ARGUMENTS
  514. *
  515. * SA1 ACTR ARGUMENT COUNT
  516. * SB4 X1
  517. * SA4 ARGR FIRST ARGUMENT
  518. * SB5 ARGTBL ARGUMENT TABLE
  519. * RJ ARG
  520. * NZ X1,INITERR ERROR IN ARGUMENTS
  521. *
  522. * ATTACH PERMANENT FILES
  523. *
  524. SETUI USERI SET USER INDEX
  525. PACKNAM PACK SET PACK NAME
  526. INIT1 ATTACH I,CPER,,,W
  527. SA1 I
  528. RJ CKSTATS
  529. NZ X2,INIT1 IF FILE WAS BUSY
  530. INIT2 ATTACH A,APER,,,W
  531. SA1 A
  532. RJ CKSTATS
  533. NZ X2,INIT2 IF FILE WAS BUSY
  534. INIT3 ATTACH S,SPER,,,W
  535. SA1 S
  536. RJ CKSTATS
  537. NZ X2,INIT3 IF FILE WAS BUSY
  538. INIT4 ATTACH X,XPER,,,W
  539. SA1 X
  540. RJ CKSTATS
  541. NZ X2,INIT4 IF FILE WAS BUSY
  542. SA1 I+1
  543. RJ CLREPR CLEAR EPR
  544. SA1 A+1
  545. RJ CLREPR CLEAR EPR
  546. SA1 S+1
  547. RJ CLREPR CLEAR EPR
  548. SA1 X+1
  549. RJ CLREPR CLEAR EPR
  550. EQ INIT
  551.  
  552. * INITERR MESSAGE INMSG
  553. * EQ ABORT
  554. * /--- BLOCK BACKONE 00 000 81/03/25 11.35
  555. CLRVSN SPACE 4
  556. ** CLRVSN - CLEAR VSN TABLE
  557. *
  558. * CLEARS (ZEROS) ANY ENTRIES IN THE VSN TABLE THAT
  559. * USE THE SAME SLOT NUMBER AS WE ARE USING
  560.  
  561.  
  562. CLRVSN DATA 0 ENTRY/EXIT
  563. SA1 VSNL VSN LENGTH
  564. SA3 SLV SLOT VALUE
  565. AX1 2 NUMBER OF SLOT ENTRIES
  566. SB7 X1
  567. SB6 B0 INITIAL VALUES
  568. MX7 -11
  569. MX6 0
  570. CLV1 SB6 B6+B1 VSN ORDINAL
  571. GT B6,B7,CLRVSN IF ALL DONE
  572. SB5 B6+B6 ADDRESS OFFSET IN SLOT TABLE
  573. SA1 VSN-2+B5 READ ENTRY
  574. BX2 -X7*X1 ISOLATE SLOT NUMBER
  575. IX2 X2-X3 SEE IF THE SAME
  576. NZ X2,CLV1 IF NOT THE SAME
  577. SA6 A1 CLEAR ENTRY
  578. SA6 A1+B1
  579. EQ CLV1 NEXT ENTRY
  580. GETAUT SPACE 4
  581. ** GETAUT - GET AUDIT TRAIL
  582. *
  583. * READS AUDIT TRAIL - PURGES ENTRIES FOR THE CURRENT
  584. * SLOT VALUE.
  585.  
  586.  
  587. GETAUT DATA 0 ENTRY/EXIT
  588. RECALL A
  589. REWIND A,R
  590. RECALL X
  591. REWIND X,R
  592. READ A,R
  593. WRITEC OUT,PAGEJ PAGE EJECT
  594. WRITEC OUT,OLDA WRITE HEADER INFO IN OUTPUT
  595. WRITEC OUT,LINE1
  596. WRITEC OUT,LINE2
  597.  
  598. GETA1 READW A,BUFA,BLDA READ ONE ENTRY
  599. NZ X1,GETAUT IF EOR, EOF
  600. SA1 BUFA MASTER FILE NAME
  601. ZR X1,GETA1 IF EMPTY
  602. SA2 SLV GET CURRENT SLOT NUMBER
  603. MX7 -7
  604. SA1 A1+B1
  605. BX6 -X7*X1
  606. IX4 X6-X2
  607. NZ X4,GETA2 IF SLOTS DO NOT MATCH
  608. RJ BUILDO OUTPUT INFO
  609. EQ GETA1
  610.  
  611. GETA2 WRITEW X,BUFA,BLDA WRITE OUT THIS ENTRY
  612. EQ GETA1
  613. GETSL SPACE 4
  614. ** GETSL - GET SLOT ENTRY
  615.  
  616.  
  617. GETSL DATA 0 ENTRY/EXIT
  618. SA1 SLOT GET SLOT POINTER
  619. SA1 SLOT+X1 GET SLOT NUMBER
  620. BX6 X1
  621. SA6 SLV
  622. ZR X6,SLERR
  623. NG X6,SLERR
  624. SX6 X6-31
  625. PL X6,SLERR
  626. RJ CDD
  627. SA6 SLMSG+1
  628. MESSAGE SLMSG OUTPUT SLOT MESSAGE
  629. EQ GETSL
  630.  
  631. SLERR MESSAGE SMERR
  632. EQ ABORT
  633.  
  634. SLMSG DATA 10H SLOT =
  635. DATA 0
  636. DATA 0
  637. RDPARAM SPACE 4
  638. ** RDSLOT - READ PARAMETER, SLOT AND VSN TABLES
  639.  
  640.  
  641. RDPARAM DATA 0 ENTRY/EXIT
  642. REWIND S,R
  643. READ S,R
  644. READW S,PARAM,MBALL*BLKSZE
  645. EQ RDPARAM
  646. * /--- BLOCK BACKONE 00 000 81/03/30 08.16
  647. WRAUDIT SPACE 4
  648. ** WRAUDIT - REWRITE AUDIT TRAIL
  649.  
  650.  
  651. WRAUDIT DATA 0 ENTRY/EXIT
  652. MESSAGE WRAM
  653. REWIND X,R REWIND BOTH FILES
  654. REWIND A,R
  655. READ X,R INITIAL READ
  656. WRA1 READW X,PARAM,MBALL*BLKSZE READ A CHUNK
  657. NG X1,WRA3 IF EOF,EOI
  658. NZ X1,WRA2 IF EOR
  659. WRITEW A,PARAM,MBALL*BLKSZE WRITE A CHUNK
  660. EQ WRA1 GET ANOUTHER CHUNK
  661.  
  662. WRA2 SB7 B6-PARAM NUMBER OF WORDS TRANSFERED
  663. WRITEW A,PARAM,B7 WRITE CHUNK
  664. WRITER A,R WRITE EOR
  665. READ X,R READ NEXT RECORD
  666. EQ WRA1 GET NEXT CHUNK
  667.  
  668. WRA3 SB7 B6-PARAM NUMBER OF WORDS TRANSFERED
  669. BX5 X1 SAVE EOF/EOI STATUS
  670. WRITEW A,PARAM,B7 WRITE CHUNK
  671. SX5 X5+1 TEST STATUS
  672. NZ X5,WRA4 IF EOI
  673. WRITEF A,R WRITE EOF
  674. READ X,R READ NEXT RECORD
  675. EQ WRA1 GET NEXT CHUNK
  676.  
  677. WRA4 RECALL A WAIT FOR I/O TO COMPLETE
  678. SA1 A+2 TEST IN AND OUT
  679. SA2 A1+B1
  680. BX1 X1-X2
  681. ZR X1,WRAUDIT IF IN=OUT (EMPTY)
  682. WRITER A,R
  683. EQ WRAUDIT EXIT
  684.  
  685. WRAM DIS ,* WRITE AUDIT TRAIL*
  686. WRPARAM SPACE 4
  687. ** WRPARAM - WRITE PARAMETER BLOCK AND REST OF S0BACKC
  688.  
  689.  
  690. WRPARAM DATA 0 ENTRY/EXIT
  691. MESSAGE WRPM
  692. REWIND S,R
  693. WRITEW S,PARAM,MBALL*BLKSZE
  694. WRITER S,R
  695. WRITEF S,R
  696. EQ WRPARAM EXIT
  697.  
  698. WRPM DIS ,* WRITE S0BACKC*
  699. * /--- BLOCK BACKONE 00 000 81/04/29 08.50
  700. TITLE END PROGRAM
  701. END SPACE 4
  702. ** END - END PROGRAM.
  703.  
  704.  
  705. END BSS 0
  706. END1 ENDRUN
  707.  
  708. ABORT MESSAGE (=C* RUN ABORTED.*)
  709. ABORT
  710.  
  711. MSG DATA 0 MASTER FILE
  712. DATA 0 NUMBER OF FILES
  713. DIS ,* FILES FOUND.*
  714.  
  715. EOFM DATA 0 MASTER FILE
  716. DIS ,* EARLY END OF FILE IN COM. BUFFER.*
  717. PAGEJ DIS ,*1* PAGE EJECT
  718. OLDA DIS ,* OLD AUDIT INFORMATION*
  719. NEWA DIS ,* NEW AUDIT ENTRY*
  720. LINE1 DIS ,= MASTER- PACKNAME FILE SLOT VSN(*) EST YY MM DD HH=
  721. LINE2 DIS ,= FILE PACK=
  722. BUILD DATA 0,0,0,0,0,0 OUTPUT LINE BUILD AREA
  723. NOVSM DIS ,* NO ROOM FOR NEW VSN IN VSN TABLE*
  724. SMERR DIS ,* SLOT NUMBER OUT OF RANGE*
  725. CMSG DATA 1L BLANK LINE
  726. ALLDONE DATA 0
  727. DIS ,* TOTAL FILES.*
  728.  
  729. REUSE DATA 0
  730. DATA 10HREUSED OLD
  731. DATA 10H SLOT =
  732. REUSEX DATA 0
  733. DATA 0
  734. *
  735. * ARGUMENT TABLE
  736. *
  737. INMSG DIS ,* ERROR IN PARAMETERS.*
  738. ARGTBL BSS 0
  739. * VFD 12/1LC,18/I,30/I
  740. * VFD 12/2LSU,18/PACK,30/PACK
  741. * VFD 12/2LCP,18/CPER,30/CPER
  742. * VFD 12/2LAP,18/APER,30/APER
  743. * ARGTBLE DATA 0 END OF TABLE
  744. SPACE 4
  745. * COMMON DECKS.
  746.  
  747.  
  748. *CALL COMCCIO
  749. *CALL COMCRDS
  750. *CALL COMCRDW
  751. *CALL COMCSYS
  752. *CALL COMCWTS
  753. *CALL COMCWTW
  754. *CALL COMCCDD
  755. *CALL COMCSFN
  756. *CALL COMCWTC
  757. **CALL COMCARG
  758. *CALL COMCWOD
  759. *CALL COMCCPM
  760. *CALL COMCPFM
  761. SPACE 4
  762. ** BUFFERS.
  763.  
  764.  
  765. BUFFERS BSS 0
  766. BSS 1
  767. BUF BSS BUFL
  768. BUF1 BSS BUFL
  769. BUFH BSS BLDH
  770. BUFA BSS BLDA
  771. IBUF BSS IBUFL
  772. OBUF BSS OBUFL
  773. ABUF BSS ABUFL
  774. SBUF BSS SBUFL
  775. XBUF BSS XBUFL
  776. OUTBUF BSS OUTBUFL
  777. PARAM BSSZ MBPARM*BLKSZE PARAMETER TABLE
  778. SLOT BSSZ MBSLOT*BLKSZE SLOT TABLE
  779. LAB BSSZ MBLAB*BLKSZE LOOK ASIDE BUFFER
  780. VSN BSSZ MBVSN*BLKSZE VSN TABLE
  781. END BACKONE