INPUT MASTER FILE |
Main or master file containing company records for a particular application |
INPUT TRANSACTION FILE |
Transaction file containing the information to add new records to the file, change
existing records, and delete records from the file |
OUTPUT NEW MASTER FILE |
New version of the main or master file containing all the old information that did
not change or was not deleted, plus the added information and the changed
information |
OUTPUT TRANSACTION ERROR REPORT |
Report of errors that could not be processed - this usually involves:
- records that were supposed to be changed but aren't there
- records that were supposed to be deleted but weren't there
- records that were supposed to be added but a record with the same id was
already there
|
OUTPUT GOOD TRANSACTIONS REPORT |
This report is mainly a paper trail - it contains a list of the transactions that
were successfully processed and any other information the company wants to record
|
|
Tran Code = A | Tran Code = C | Tran Code = D |
MID < TID |
Since the master is less than the transaction, there is no activity for
that master. The master is simply written on the new master file.
Note: with changed masters, be sure to write changed master record
A read is done on the input master file to get the next master record.
|
MID = TID |
Invalid add transaction - error will be written on the report (can't add a record
that is already there). Since the transaction was processed and the master was
not, a new transaction record is read. |
Valid change transaction - changes are made to the master record in memory, record
is written to valid transaction report and another transaction is read (this will
allow for multiple changes to the same master record - see note below) |
Valid delete transaction - the master record will not be written on the output new
master file (see note below) - record is written to valid transaction report -
another master record and another transaction record will be read |
MID > TID |
Valid add transaction - information from add transaction is written on the output
new master file and valid transaction report. Since the transaction was processed,
a new transaction record is read |
Invalid change transaction - error will be written on the report (can't change
master that isn't there). Since the transaction was processed, a new transaction
record is read. |
Invalid delete transaction - error will be written on the report (can't delete
master that isn't here). Since the transaction was processed. a new transction
record is read. |
|
Tran Code = A | Tran Code = C | Tran Code = D |
MID < TID |
- Write old master record on the new master file (changes if made)
- Input master file is read
|
MID = TID |
INVALID ADD
- Invalid add written to error report
- Transaction read
|
VALID CHANGE
- Change is made in memory
- Valid change tranaction written to valid report
- Transaction read
|
VALID DELETE
- Nothing is written to new master file
- Valid delete transaction written to valid report
- Transaction read
- Input master file read
|
MID > TID |
VALID ADD
- Valid add written to new master file
- Transaction written to valid report
- Transaction read
|
INVALID CHANGE
- Invalid change written to error report
- Transaction read
|
INVALID DELETE
- Invalid delete written to error report
- Transaction read
|