plato:source:plaopl:backtwo
Table of Contents
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
- BACKTWO
- * /--- FILE TYPE = E
- * /--- BLOCK BACKTWO 00 000 81/04/29 11.24
- BACKTWO
- IDENT BACKTWO,BEGIN,BACKTWO
- ENTRY BACKTWO
- SYSCOM B1 DEFINE (B1) = 1
- *COMMENT BACKUPS DATA CRUNCH - PHASE TWO
- COMMENT COPYRIGHT CONTROL DATA CORP. 1980.
- TITLE BACKUPS DATA CRUNCH - PHASE TWO
- SPACE 4
- *** BACKTWO - BACKUPS DATA CRUNCH PHASE TWO
- * J. J. BUCHMANN. 80/01/15.
- *
- *FUNCTION;
- * THIS PROGRAM DOES THE SECOND PHASE OF THE BACKUPS
- * DATABASE MERGE PROCESS. THIS PROGRAM USES THE
- * PARAMETERS FILE, AND THE FILE DATA FROM BACKONE (AFTER
- * IT HAS BEEN SORTED BY SORT/MERGE) AND IT ATTACHES THE
- * DUMP DIRECTORY. IT THEN EXTRACTS THE CURRENT SLOT
- * VALUE FROM THE PARAMETERS FILE. THE DUMP DIRECTORY
- * AND THE SORT FILE INFORMATION FILE ARE THEN COMPARED
- * ENTRY BY ENTRY (THE ACOUNT NAME, FILE NAME, AND FILE
- * TYPE/SIZE ARE COMPARED). IF AN OLD ENTRY IN THE DUMP
- * DIRECTORY IS FOUND WITHOUT AN EQUIVALENT NEW ENTRY,
- * THEN THE CURRENT SLOT INFORMATION IS CLEARED; IF ALL
- * SLOT ARE EMPTY, THIS ENTRY IS DISCARDED, OTHERWISE IT
- * IS WRITTEN TO THE NEW DUMP DIRECTORY FILE. IF A NEW
- * ENTRY IS FOUND WITHOUT AN EQUIVALENT OLD ENTRY; A NEW
- * ENTRY IS CREATED WITH THE CURRENT SLOT INFORMATION.
- * IF AN OLD AND NEW ENTRY ARE FOUND TO BE EQUIVALENT,
- * THE A MERGED ENTRY WITH UPDATED SLOT INFORMATION IS
- * WRITTEN TO THE NEW DIRECTORY FILE. AS INFORMATION IS
- * WRITTEN TO THE DUMP DIRECTORY, A FIRST-LEVEL INDEX IS
- * CREATED IN A PORTION OF THE PARAMETERS FILE CALLED THE
- * LOOK-ASIDE BUFFER.
- *
- * AFTER ALL ENTRIES HAVE BEEN WRITTEN TO THE NEW DUMP
- * DIRECTORY FILE, THAT FILE IS REWOUND AND COPIED OVER
- * THE ORIGINAL, THE SLOT POINTER IS ADVANCED TO THE NEXT
- * SLOT, AND THE PARAMETERS FILE IS REWRITTEN.
- *
- *PARAMETERS; NONE
- *
- *INFORMATIVE MESSAGES;
- * MERGING
- * WRITING DUMP DIRECTORY
- * SLOT = NNNN (CURRENT SLOT VALUE)
- * NEW SLOT = NNNN (NEW SLOT VALUE FOR TOMORROWS DUMP)
- * NNNNN NULL ENTRIES IGNORED
- * NNNNN OLD ENTRIES WITH NO MATCH
- * NNNNN NEW ENTRIES WITH NO MATCH
- * NNNNN MERGED OLD AND NEW ENTRIES
- * NNNNN ENTRIES WRITTEN TO DISK
- * NNNNN ENTRIES PURGED
- * DIRECTORY MERGE COMPLETE
- *
- *ERROR MESSAGES;
- * SLOT NUMBER OUT OF RANGE(SLOT VALUE .GT. 30 OR .LT. 1)
- *
- *INTERNAL ERROR MESSAGES;
- * LOOK ASIDE BUFFER TOO SMALL
- *
- *INFORMATION PASSED INTO THE OUTPUT FILE;
- * INPUT RECORDS OUT OF ORDER
- * MERGE RECORDS OUT OF ORDER
- * DUPLICATE INPUT RECORDS
- * DUPLICATE MERGE RECORDS
- * /--- BLOCK BACKTWO 00 000 81/04/29 08.06
- SPACE 4
- *CALL COMCMAC
- *CALL COMCCMD
- SPACE 4
- **** ASSEMBLY CONSTANTS.
- BLDI EQU 10 INPUT BUFFER LENGTH
- BLDO EQU 10 OUTPUT BUFFER LENGTH
- BLDM EQU 4 SORT INFO. BUFFER LENGTH
- IBUFL EQU 2001B IFILE BUFFER LENGTH
- OBUFL EQU 2001B OFILE BUFFER LENGTH
- MBUFL EQU 2001B MFILE BUFFER LENGTH
- SBUFL EQU 2001B SFILE BUFFER LENGTH
- DBUFL EQU 2000B DUMP BUFFER LENGTH
- DSHF EQU 42 SHIFT COUNT DUMP DIR. NAME INC.
- BLKSZE EQU 320 BLOCK SIZE (WORDS) FOR S0BACKC
- MBPARM EQU 1 MAX NUM OF BLOCKS / PARAMETERS
- MBSLOT EQU 2 MAX NUM OF BLOCKS / SLOT TABLE
- MBLAB EQU 25 MAX NUM OF BLOCKS / LOOK ASIDE
- MBVSN EQU 25 MAX NUM OF BLOCKS / VSN TABLE
- MBALL EQU MBPARM+MBSLOT+MBLAB+MBVSN TOTAL NUM BLOCKS
- * OFFSETS WITHIN PARAMETER BLOCK
- PDATE EQU 0 LAST BACKUP DATE
- PTIME EQU 1 LAST BACKUP TIME
- PBASE EQU 2 DUMP DIRECTORY BASE NAME
- PDNUM EQU 3 NUMBER OF DATASETS IN DUMP DIR.
- PNREC EQU 4 NUMBER OF RECORDS IN DATASETS
- PLREC EQU 5 NUMBER OF RECORDS-LAST DATASET
- PLABW EQU 6 WORDS IN LOOK-ASIDE BUFFER
- PPAGE EQU 9 PAGE SIZE
- REQPK EQU 50 REQUIRED PACK OFFSET IN PARAMS.
- * /--- BLOCK BACKTWO 00 000 81/05/07 06.50
- ****
- TITLE COMMON DATA
- BEGIN BSS 0
- FETS BSS 0
- I BSS 0
- BACKDIR RFILEB IBUF,IBUFL,(FET=13D),EPR
- O BSS 0
- DUMPDIR RFILEB OBUF,OBUFL,(FET=13D),EPR
- M BSS 0
- TAPE4 RFILEB MBUF,MBUFL,(FET=8D)
- S BSS 0
- S0BACKC RFILEB SBUF,SBUFL,(FET=8D)
- OUT BSS 0
- OUTPUT RFILEB OUTBUF,2001B
- SPACE 4
- * DATA WORDS
- USERI EQU 377773B USER INDEX FOR FILES
- PACK DATA 0 PACK NAME FOR ATTACHES
- DPER DATA 7LBACKDIR PERMANENT FILE FOR DUMP DIRECT.
- OPER DATA 7LDUMPDIR PERMANENT FILE FOR DUMP DIRECT.
- COLD DATA 0 COUNT OF OLD FILES WITH NO NEW
- CNEW DATA 0 COUNT OF NEW FILES WITH NO OLD
- CMRG DATA 0 COUNT OF NEW FILES WITH AN OLD
- COUT DATA 0 COUNT OF ENTRIES WRITTEN
- CPRG DATA 0 COUNT OF ENTRIES PURGED
- CZRO DATA 0 COUNT OF ENTRIES IGNORED
- SLTN DATA 0 SLOT NUMBER
- SLOFF DATA 0 SLOT OFFSET IN BUFFER
- SLSHF DATA 0 SLOT SHIFT WITHIN WORD
- PAGE DATA 0 PAGE SIZE
- CPAG DATA 0 CURRENT NUMBER OF WORDS IN PAGE
- DREC DATA 500 RECORD SIZE FOR DUMP DIRECTORY
- DNAM DATA 0 BASE NAME FOR DUMP DIRECTORY
- DNUM DATA 0 NUMBER OF DUMP DIRECTORIES
- DNOR DATA 0 NUMBER OF RECORDS/THIS DATASET
- DNORA DATA 0 NUMBER OF RECORDS/ALL DATASETS
- DNORL DATA 0 NUMBER OF RECORDS/LAST DATASET
- CNOR DATA 0 CURRENT RECORD NUMBER
- CNUM DATA 0 CURRENT DATASET NUMBER
- LABINC DATA 0 LOOK ASIDE INCREMENT
- LABSZE VFD 60/MBLAB*BLKSZE LOOK ASIDE BUFFER SIZE
- OLDI DATA 0,0,0 OLD INPUT FILE PARAMS
- OLDM DATA 0,0,0 OLD MERGE FILE PARAMS
- * /--- BLOCK BACKTWO 00 000 81/04/02 08.27
- TITLE MAIN PROGRAM.
- *** BACKTWO
- BACKTWO SB1 1 (B1) = 1
- RJ INIT INITIALIZE
- RJ INTS INITIALIZE SLOT OFFSETS
- RJ SETLA ZERO LOOK ASIDE BUFFER
- MESSAGE MRGM
- MRG1 RECALL I REWIND FILES
- REWIND I,R
- RECALL M
- REWIND M,R
- RECALL O
- REWIND O,R
- MRG2 READ I
- READ M
- MRG3 RJ RDIN READ INPUT ENTRY
- NZ X1,MRG9 IF EOR, EOF
- MRG4 RJ RDMR READ SORT ENTRY
- NZ X1,MRG12 IF EOR, EOF
- MRG5 SA1 BUFI FIRST WORD OF OLD DATA
- SA2 BUFM FIRST WORD OF NEW DATA
- IX7 X1-X2
- NG X7,MRG6 IF OLD .LT. NEW
- NZ X7,MRG7 IF OLD .GT. NEW
- SA1 A1+B1 NEXT WORD OF OLD
- SA2 A2+B1 NEXT WORD OF NEW
- IX7 X1-X2
- NG X7,MRG6 IF OLD .LT. NEW
- NZ X7,MRG7 IF OLD .GT. NEW
- SA1 A1+B1 NEXT WORD OF OLD
- SA2 A2+B1 NEXT WORD OF NEW
- MX3 30
- BX1 X3*X1 TOP 30 OF OLD
- BX2 X3*X2 TOP 30 OF NEW
- IX7 X1-X2
- PL X7,MRG7 IF OLD .GE. NEW
- *
- * OLD .LT. NEW - MOVE OLD ENTRY
- *
- MRG6 RJ MVEI MOVE OLD ENTRY
- RJ CLRS CLEAR SLOT
- RJ WRTO WRITE IT OUT
- SA1 COLD INCREMENT OLD
- SX7 X1+B1
- SA7 A1
- RJ RDIN READ NEXT ENTRY
- ZR X1,MRG5 IF NO EOR, EOF, ETC.
- EQ MRG10
- MRG7 ZR X7,MRG8 IF OLD .EQ. NEW
- *
- * OLD .GT. NEW - CREATE NEW ENTRY
- *
- RJ CREM CREATE NEW ENTRY
- SA1 BUFM+3 GET VSN VALUE
- RJ INSM INSERT NEW SLOT
- RJ WRTO WRITE IT OUT
- SA1 CNEW INCREMENT NEW
- SX7 X1+B1
- SA7 A1
- EQ MRG4 GET NEXT NEW ENTRY
- * /--- BLOCK BACKTWO 00 000 81/03/26 13.00
- *
- * OLD .EQ. NEW
- *
- MRG8 RJ MVEI MOVE OLD ENTRY
- SA1 BUFM+3 GET VSN VALUE
- RJ INSM INSERT SLOT
- RJ WRTO WRITE IT OUT
- SA1 CMRG INCREMENT MERGE COUNT
- SX7 X1+B1
- SA7 A1
- EQ MRG3 READ THE NEXT OLD/NEW ENTRIES
- MRG9 RJ RDMR GET NEXT SORT ENTRY
- NZ X1,MRG13 IF EOR, EOF
- MRG10 RJ CREM CREATE NEW ENTRY
- SA1 BUFM+3 GET VSN VALUE
- RJ INSM INSERT SLOT
- RJ WRTO WRITE IT OUT
- SA1 CNEW INCREMENT NEW
- SX7 X1+B1
- SA7 A1
- EQ MRG9 GET NEXT ENTRY
- MRG11 RJ RDIN GET NEXT ENTRY
- NZ X1,MRG13 IF EOR, EOF ETC.
- MRG12 RJ MVEI MOVE OLD ENTRY
- RJ CLRS CLEAR SLOT
- RJ WRTO WRITE IT OUT
- SA1 COLD INCREMENT OLD
- SX7 X1+B1
- SA7 A1
- EQ MRG11 GET NEXT ENTRY
- MRG13 WRITER O,R
- WRITEF O,R
- EQ END
- MRGM DIS ,*MERGING*
- TITLE SUBROUTINES.
- CKSTATS SPACE 4
- ** CKSTATS - CHECK FILE STATUS FOR BUSY
- * ROLLOUT FOR 64 SECONDS IF BUSY
- * ABORT IF ERROR
- *
- * ENTRY X1-FET STATUS WORD
- *
- * EXIT X2=0, NOT BUSY
- CKSTATS DATA 0 ENTRY/EXIT
- AX1 10
- MX7 -8
- BX2 -X7*X1 ISOLATE STATUS
- ZR X2,CKSTATS IF NOT BUSY AND NO ERROR
- SX2 X2-1
- NZ X2,ABORT ATTACH ERROR
- ROLLOUT CKSW
- SX2 1 BUSY STATUS
- EQ CKSTATS
- CKSW DATA 7700000100B
- * /--- BLOCK BACKTWO 00 000 81/04/02 08.28
- CLREPR SPACE 4
- ** CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
- *
- * ENTRY A1/X1=FET+1 AND CONTENTS
- CLREPR DATA 0 ENTRY/EXIT
- SX6 B1 MASK FOR EPR
- LX6 44
- BX6 -X6*X1
- SA6 A1
- EQ CLREPR
- CLRS SPACE 4
- ** CLRS - CLEAR SLOT ENTRY
- CLRS DATA 0 ENTRY/EXIT
- SX1 B0 SET TO STORE A ZERO
- RJ INSM INSERT SLOT
- EQ CLRS EXIT
- CREM SPACE 4
- ** CREM - CREATE NEW ENTRY
- *
- * CREATE NEW ENTRY FROM MERGE DATA
- * SETS WRITE/CLEAR/INSERT POINTER TO NEW ENTRY
- CREM DATA 0 ENTRY/EXIT
- SB7 BLDO-1 ZERO OUTPUT WORKING BUFFER
- SX7 0
- CRE1 SA7 BUFO+B7
- SB7 B7-1
- PL B7,CRE1
- SA1 BUFM GET ACCOUNT NAME
- SA2 A1+B1 GET FILE NAME
- BX6 X1
- BX7 X2
- SA6 BUFO
- SA7 A6+B1
- SA1 A2+B1 GET FILE INFO. WORD.
- MX6 30 STORE UPPER 30 ONLY
- BX6 X6*X1
- SA6 A7+B1
- EQ CREM EXIT
- INIT SPACE 4
- ** INIT - INITIALIZE PARAMETERS
- INIT DATA 0 ENTRY/EXIT
- SETUI USERI SET USER INDEX
- PACKNAM PACK SET PACK NAME
- INIT1 ATTACH I,DPER,,,W
- SA1 I
- RJ CKSTATS
- NZ X2,INIT1 IF FILE WAS BUSY
- SA1 I+1
- RJ CLREPR CLEAR EPR
- INIT2 ATTACH O,OPER,,,W
- SA1 O
- RJ CKSTATS
- NZ X2,INIT2 IF FILE WAS BUSY
- SA1 O+1
- RJ CLREPR CLEAR EPR
- RJ RDPARAM READ PARAMETERS
- SA1 PARAM+PBASE DATABASE NAME
- SA2 PARAM+PDNUM NUMBER OF DATASETS
- BX6 X1
- BX7 X2
- SA6 DNAM
- SA7 DNUM
- SA1 PARAM+PNREC NUMBER OF RECORDS
- SA2 PARAM+PLREC NUMBER OF RECORDS(LAST DATASET)
- BX6 X1
- BX7 X2
- SA6 DNORA
- SA7 DNORL
- SA1 PARAM+PPAGE PAGE SIZE
- BX6 X1
- SA6 PAGE
- SA6 CPAG
- EQ INIT
- * /--- BLOCK BACKTWO 00 000 81/04/02 08.11
- INSM SPACE 4
- ** INSM - INSERT SLOT INFO.
- *
- * SETS SLOT INFO. INTO ENTRY
- *
- * X1 = INFO TO BE ADDED TO SLOT (0 WILL CLEAR)
- INSM DATA 0 ENTRY/EXIT
- SA2 SLOFF SLOT OFFSET
- SA2 X2+BUFO READWORD
- SA3 SLSHF SHIFT COUNT
- SX7 77777B MASK
- SB7 X3
- LX7 B7
- BX6 -X7*X2 MASK OUT OLD ENTRY
- LX1 B7 NEW DATA
- IX6 X6+X1
- SA6 A2 RESTORE
- EQ INSM EXIT
- INTS SPACE 4
- ** INTS - INITIATE SLOT
- INTS DATA 0 ENTRY/EXIT
- SA1 SLOT GET SLOT POINTER
- SA1 SLOT+X1 GET SLOT NUMBER
- BX6 X1
- SA6 SLTN
- ZR X6,SLERR
- NG X6,SLERR
- SX6 X6-31
- PL X6,SLERR
- SX1 X1+9 OFFSET
- BX6 X1
- AX6 2 DIVIDE BY 4
- SA6 SLOFF BUFFER OFFSET
- LX6 2 MULTIPLY BY 4
- IX6 X1-X6 0 FOR TOP, 3 FOR BOTTOM
- SX7 3
- IX7 X7-X6 0 FOR BOTTOM, 3 FOR TOP
- BX6 X7
- LX6 4 *16
- IX6 X6-X7 *15
- SA6 SLSHF SLOT SHIFT COUNT
- SA1 SLTN
- RJ CDD
- SA6 SLMSG+1
- MESSAGE SLMSG OUTPUT SLOT MESSAGE
- EQ INTS
- MVEI SPACE 4
- ** MVEI - MOVE OLD ENTRY
- *
- * SETS WRITE/CLEAR/INSERT POINTER TO OLD ENTRY
- MVEI DATA 0 ENTRY/EXIT
- SB7 BLDO-1
- MVE1 SA1 BUFI+B7
- BX6 X1
- SB7 B7-B1
- SA6 BUFO+1+B7
- PL B7,MVE1
- EQ MVEI EXIT
- * /--- BLOCK BACKTWO 00 000 80/09/11 13.07
- RDIN SPACE 4
- ** RDIN - READ INPUT FILE
- *
- * TEST FOR REAL EOR, EOF
- * TEST FOR LOGICAL EOR, EOF (ACCOUNT AND FILE = -1)
- * SKIPS ZERO ENTRIES
- * TESTS FOR DUPLICATE ENTRIES OR OUT OF ORDER
- *
- * EXIT - X1=0, NO EOR, EOF
- RDIN DATA 0 ENTRY/EXIT
- RDIN1 READW I,BUFI,BLDI
- NZ X1,RDIN IF REAL EOR, EOF
- SA1 BUFI NEW ACCOUNT NAME
- SA2 A1+B1 NEW FILE NAME
- SA3 A2+B1 NEW FIW
- ZR X1,RDIN9
- RDIN2 SX6 B1
- IX7 X6+X1 SEE IF ACCOUNT NAME = -1
- ZR X7,RDIN8
- RDIN3 SA4 OLDI OLD ACCOUNT NAME
- SA5 A4+B1 OLD FILE NAME
- BX6 X1 NEW ACCOUNT NAME
- SA1 A5+B1 OLD FIW
- MX7 30
- BX3 X7*X3 MASK FIW
- IX7 X6-X4
- NZ X7,RDIN4 IF ACCOUNT NAMES NOT EQUAL
- IX7 X2-X5
- NZ X7,RDIN4 IF FILE NAMES NOT EQUAL
- IX7 X3-X1
- ZR X7,RDIN7 IF DUPLICATE ENTRIES
- RDIN4 NG X7,RDIN5 IF ENTRIES OUT OF ORDER
- SA6 A4 SAVE ACCOUNT, FILE, AND FIW
- BX7 X2
- SA7 A6+B1
- BX6 X3
- SA6 A7+B1
- MX1 0 NO EOR FLAG
- EQ RDIN
- RDIN5 WRITEC OUT,RDIM1 ENTRIES OUT OF ORDER
- RJ OLDIOUT OUTPUT OLD INPUT ENTRIES
- RDIN6 RJ NEWIOUT OUTPUT NEW INPUT ENTRIES
- SA1 BUFI SAVE ACCOUNT, FILE, AND FIW
- SA2 A1+B1
- SA3 A2+B1
- MX4 30
- BX6 X1
- SA6 OLDI
- BX7 X2
- SA7 A6+B1
- BX6 X4*X3
- SA6 A7+B1
- MX1 0 NO EOR FLAG
- EQ RDIN
- RDIN7 WRITEC OUT,RDIM2 DUPLICATE ENTRIES
- EQ RDIN6
- RDIN8 IX7 X6+X2 SEE IF FILE NAME = -1
- NZ X7,RDIN3 CONTINUE PROCESSING
- SX1 B1 SET EOR FLAG
- EQ RDIN
- RDIN9 NZ X2,RDIN2 IF FILE NAME .NE. 0
- SA1 CZRO INCREMENT ZERO COUNT
- SX6 X1+B1
- SA6 A1
- EQ RDIN1 READ ANOTHER RECORD
- * /--- BLOCK BACKTWO 00 000 81/03/26 11.41
- RDMR SPACE 4
- ** RDMR - READ MERGE FILE
- *
- * TEST FOR REAL EOR, EOF
- * TESTS FOR DUPLICATE ENTRIES OR OUT OF ORDER
- *
- * EXIT - X1=0, NO EOR, EOF
- RDMR DATA 0 ENTRY/EXIT
- READW M,BUFM,BLDM
- NZ X1,RDMR IF REAL EOR, EOF
- SA1 BUFM NEW ACCOUNT NAME
- SA2 A1+B1 NEW FILE NAME
- SA3 A2+B1 NEW FIW
- SA4 OLDM OLD ACCOUNT NAME
- SA5 A4+B1 OLD FILE NAME
- BX6 X1 NEW ACCOUNT NAME
- SA1 A5+B1 OLD FIW
- MX7 30
- BX3 X7*X3 MASK FIW
- IX7 X6-X4
- NZ X7,RDMR1 IF ACCOUNT NAMES NOT EQUAL
- IX7 X2-X5
- NZ X7,RDMR1 IF FILE NAMES NOT EQUAL
- IX7 X3-X1
- ZR X7,RDMR4 IF DUPLICATE ENTRIES
- RDMR1 NG X7,RDMR2 IF ENTRIES OUT OF ORDER
- SA6 A4 SAVE ACCOUNT, FILE, AND FIW
- BX7 X2
- SA7 A6+B1
- BX6 X3
- SA6 A7+B1
- MX1 0 NO EOR FLAG
- EQ RDMR
- RDMR2 WRITEC OUT,RDMM1 ENTRIES OUT OF ORDER
- RJ OLDMOUT OUTPUT OLD MERGE ENTRIES
- RDMR3 RJ NEWMOUT OUTPUT NEW MERGE ENTRIES
- SA1 BUFM SAVE ACCOUNT, FILE, AND FIW
- SA2 A1+B1
- SA3 A2+B1
- MX4 30
- BX6 X1
- SA6 OLDM
- BX7 X2
- SA7 A6+B1
- BX6 X4*X3
- SA6 A7+B1
- MX1 0 NO EOR FLAG
- EQ RDMR
- RDMR4 WRITEC OUT,RDMM2 DUPLICATE ENTRIES
- EQ RDMR3
- SETLA SPACE 4
- ** SETLA - SET LOOK ASIDE BUFFER TO ZERO
- SETLA DATA 0 ENTRY/EXIT
- SA1 LABSZE SIZE OF BUFFER
- SB6 LAB BEGINNING ADDRESS
- SB7 X1+LAB
- SX7 0
- SLA1 SA7 B6
- SB6 B6+B1
- LT B6,B7,SLA1
- EQ SETLA
- * /--- BLOCK BACKTWO 00 000 81/03/27 11.09
- RDPARAM SPACE 4
- ** RDSLOT - READ PARAMETER, SLOT AND VSN TABLES
- RDPARAM DATA 0 ENTRY/EXIT
- REWIND S,R
- READ S,R
- READW S,PARAM,MBALL*BLKSZE
- EQ RDPARAM
- WRDMP SPACE 4
- ** WRDMP - REWRITE DUMP DIRECTORY
- WRDMP DATA 0 ENTRY/EXIT
- MESSAGE WRDW
- REWIND O,R REWIND BOTH FILES
- REWIND I,R
- READ O,R INITIAL READ
- WRD1 READW O,DBUF,DBUFL READ A CHUNK
- NG X1,WRD3 IF EOF,EOI
- NZ X1,WRD2 IF EOR
- WRITEW I,DBUF,DBUFL WRITE A CHUNK
- EQ WRD1 GET ANOUTHER CHUNK
- WRD2 SB7 B6-DBUF NUMBER OF WORDS TRANSFERED
- WRITEW I,DBUF,B7 WRITE CHUNK
- WRITER I,R WRITE EOR
- READ O,R READ NEXT RECORD
- EQ WRD1 GET NEXT CHUNK
- WRD3 SB7 B6-DBUF NUMBER OF WORDS TRANSFERED
- BX5 X1 SAVE EOF/EOI STATUS
- WRITEW I,DBUF,B7 WRITE CHUNK
- SX5 X5+1 TEST STATUS
- NZ X5,WRD4 IF EOI
- WRITEF I,R WRITE EOF
- READ O,R READ NEXT RECORD
- EQ WRD1 GET NEXT CHUNK
- WRD4 RECALL I WAIT FOR I/O TO COMPLETE
- SA1 I+2 TEST IN AND OUT
- SA2 A1+B1
- BX1 X1-X2
- ZR X1,WRDMP IF IN=OUT (EMPTY)
- WRITER I,R
- EQ WRDMP EXIT
- WRDW DIS ,*WRITING DUMP DIRECTORY*
- WRPARAM SPACE 4
- ** WRPARAM - WRITE PARAMETER BLOCK AND REST OF S0BACKC
- WRPARAM DATA 0 ENTRY/EXIT
- REWIND S,R
- WRITEW S,PARAM,MBALL*BLKSZE
- WRITER S,R
- WRITEF S,R
- EQ WRPARAM EXIT
- * /--- BLOCK BACKTWO 00 000 81/03/27 10.39
- WRTO SPACE 4
- ** WRTO - WRITE OUTPUT
- *
- * WRITE THE OUTPUT ENTRY
- * INCREMENT OUTPUT COUNTER
- WRTO DATA 0 ENTRY/EXIT
- SB7 BLDO-4 CHECK FOR EMPTY ENTRY
- WRT1 SA1 BUFO+3+B7
- NZ X1,WRT2 IF NOT EMPTY
- SB7 B7-B1
- PL B7,WRT1
- SA1 A1-B1 GET LAST 30 BITS
- MX7 30
- BX7 -X7*X1
- NZ X7,WRT2
- SA1 CPRG INCREMENT PURGE COUNT
- SX7 X1+B1
- SA7 A1
- EQ WRTO EXIT
- WRT2 WRITEW O,BUFO,BLDO
- SA1 COUT INCREMENT OUTPUT COUNTER
- SX7 X1+B1
- SA7 A1
- SA1 CPAG INCREASE CURRENT PAGE COUNT
- SA2 PAGE MAX. NUMBER OF WORDS/PAGE
- SX6 X1+BLDO
- IX7 X1-X2
- SA6 A1
- NG X7,WRTO IF SAME PAGE
- IX6 X6-X2
- SA6 A1
- SA1 LABINC ADD INFO TO LOOK ASIDE BUFFER
- SB7 X1
- SA1 BUFO
- SA2 A1+B1
- BX6 X1
- BX7 X2
- SA6 LAB+B7
- SA7 A6+B1
- SX6 B7+2
- SA6 LABINC
- SA1 LABSZE COMPARE WITH MAXIMUM
- IX7 X1-X6
- PL X7,WRTO
- MESSAGE WRTE
- EQ ABORT
- * /--- BLOCK BACKTWO 00 000 81/03/27 10.31
- TITLE OUTPUT ERROR MESSAGES
- NEWIOUT SPACE 4
- ** NEWIOUT - OUTPUT NEW ACCOUNT, FILE, AND FIW
- NEWIOUT DATA 0
- SA1 BUFI
- RJ SFN
- SA6 RDIM4
- SA1 BUFI+1
- RJ SFN
- SA6 RDIM4+1
- SA1 BUFI+2
- RJ WOD
- SA6 RDIM4+2
- WRITEC OUT,RDIM3
- EQ NEWIOUT
- OLDIOUT SPACE 4
- ** OLDIOUT - OUTPUT OLD ACCOUNT, FILE, AND FIW
- OLDIOUT DATA 0
- SA1 OLDI
- RJ SFN
- SA6 RDIM6
- SA1 OLDI+1
- RJ SFN
- SA6 RDIM6+1
- SA1 OLDI+2
- RJ WOD
- SA6 RDIM6+2
- WRITEC OUT,RDIM5
- EQ OLDIOUT
- NEWMOUT SPACE 4
- ** NEWMOUT - OUTPUT NEW ACCOUNT, FILE, AND FIW
- NEWMOUT DATA 0
- SA1 BUFM
- RJ SFN
- SA6 RDIM4
- SA1 BUFM+1
- RJ SFN
- SA6 RDIM4+1
- SA1 BUFM+2
- RJ WOD
- SA6 RDIM4+2
- WRITEC OUT,RDIM3
- EQ NEWMOUT
- OLDMOUT SPACE 4
- ** OLDMOUT - OUTPUT OLD ACCOUNT, FILE, AND FIW
- OLDMOUT DATA 0
- SA1 OLDM
- RJ SFN
- SA6 RDIM6
- SA1 OLDM+1
- RJ SFN
- SA6 RDIM6+1
- SA1 OLDM+2
- RJ WOD
- SA6 RDIM6+2
- WRITEC OUT,RDIM5
- EQ OLDMOUT
- MESSAGE SPACE 4
- RDIM1 DIS ,* INPUT RECORDS OUT OF ORDER*
- RDIM2 DIS ,* DUPLICATE INPUT RECORDS*
- RDIM3 DATA 10H NEW ACCO
- DATA 10HUNT / FILE
- DATA 10H / FIW
- RDIM4 DATA 0,0,0,0
- RDIM5 DATA 10H OLD ACCO
- DATA 10HUNT / FILE
- DATA 10H / FIW
- RDIM6 DATA 0,0,0,0
- RDMM1 DIS ,* MERGE RECORDS OUT OF ORDER*
- RDMM2 DIS ,* DUPLICATE MERGE RECORDS*
- * /--- BLOCK BACKTWO 00 000 81/04/29 08.51
- TITLE END PROGRAM - MESSAGES - COMDECKS - BUFFERS
- END SPACE 4
- ** END - END PROGRAM.
- END BSS 0 END PROGRAM
- RJ WRDMP WRITE DUMP DIRECTORY
- SA1 SLOT INCREMENT SLOT POINTER
- SX6 X1+1
- SA2 X6+SLOT SEE IF END OF TABLE
- NZ X2,END0 IF OK
- SX6 1 START OVER
- SA2 SLOT+1
- END0 SA6 A1 REWRITE
- BX6 X2
- SA6 SLTN NEW SLOT NUMBER
- DATE PARAM+PDATE CURRENT DATE IN PARAMETER TABLE
- CLOCK PARAM+PTIME CURRENT TIME
- SA1 LABINC LOOK ASIDE BUFFER LENGTH
- BX6 X1
- SA6 PARAM+PLABW
- RJ WRPARAM REWITE PARAMETER BLOCK
- SA1 CZRO OUTPUT IGNORED ENTRIES
- RJ CDD
- SA6 CZROM
- SA1 COLD OUTPUT OLD WITH NO NEW
- RJ CDD
- SA6 COLDM
- SA1 CNEW OUTPUT NEW WITH NO OLD
- RJ CDD
- SA6 CNEWM
- SA1 CMRG OUTPUT MERGE COUNT
- RJ CDD
- SA6 CMRGM
- SA1 COUT OUTPUT WRITE COUNT
- RJ CDD
- SA6 COUTM
- SA1 CPRG OUTPUT PURGE COUNT
- RJ CDD
- SA6 CPRGM
- SA1 SLTN OUTPUT NEWSLOT NUMBER
- RJ CDD
- SA6 NEWSL+1
- MESSAGE CZROM OUTPUT IGNORED COUNT
- MESSAGE COLDM OUTPUT OLD COUNT
- MESSAGE CNEWM OUTPUT NEW COUNT
- MESSAGE CMRGM OUTPUT MERGE COUNT
- MESSAGE COUTM OUTPUT OUTPUT COUNT
- MESSAGE CPRGM OUTPUT PURGE COUNT
- MESSAGE NEWSL OUTPUT NEW SLOT NUMBER
- MESSAGE (=C* DIRECTORY MERGE COMPLETED*)
- END1 WRITER OUT,R
- ENDRUN
- SLERR MESSAGE SMERR
- ABORT WRITER OUT,R
- ABORT
- * DERR1 MESSAGE DMERR1
- * EQ ABORT
- * /--- BLOCK BACKTWO 00 000 81/04/29 08.51
- SPACE 4
- ** MESSAGES
- *
- CZROM DATA 0
- DIS ,= NULL ENTRIES IGNORED.=
- COLDM DATA 0
- DIS ,= OLD ENTRIES WITH NO MATCH.=
- CNEWM DATA 0
- DIS ,= NEW ENTRIES WITH NO MATCH.=
- CMRGM DATA 0
- DIS ,= MERGED OLD AND NEW ENTRIES.=
- COUTM DATA 0
- DIS ,= ENTRIES WRITTEN TO DISK.=
- CPRGM DATA 0
- DIS ,= ENTRIES PURGED.=
- * SMSG DIS ,* SLOT TABLE TOO LONG*
- SMERR DIS ,* SLOT NUMBER OUT OF RANGE*
- * DMERR1 DIS ,* NOT ENOUGH DUMP DIRECTORY DATASETS*
- WRTE DIS ,* LOOK ASIDE BUFFER TOO SMALL*
- SLMSG DATA 10H SLOT =
- DATA 0
- DATA 0
- NEWSL DATA 10HNEW SLOT =
- DATA 0
- DATA 0
- SPACE 4
- * COMMON DECKS.
- *CALL COMCCIO
- *CALL COMCRDS
- *CALL COMCRDW
- *CALL COMCSYS
- *CALL COMCWTS
- *CALL COMCWTW
- *CALL COMCCDD
- *CALL COMCSFN
- *CALL COMCWOD
- *CALL COMCWTC
- SPACE 4
- ** BUFFERS.
- BUFFERS BSS 0
- TEMP BSS 1
- BUFI BSS BLDI
- BUFO BSS BLDO
- BUFM BSS BLDM
- IBUF BSS IBUFL
- OBUF BSS OBUFL
- MBUF BSS MBUFL
- SBUF BSS SBUFL
- OUTBUF BSS 2001B
- PARAM BSSZ MBPARM*BLKSZE PARAMETER TABLE
- SLOT BSSZ MBSLOT*BLKSZE SLOT TABLE
- LAB BSSZ MBLAB*BLKSZE LOOK ASIDE BUFFER
- VSN BSSZ MBVSN*BLKSZE VSN TABLE
- DBUF BSSZ DBUFL DUMP BUFFER
- END BACKTWO
plato/source/plaopl/backtwo.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator