Trying to create this program with COBOL and having a hard time understanding the problem definition. Any help would be appreciated.
Create a COBOL program to update a master indexed file.
Notes:
A. Customer number is the key field for the indexed master file.
B. If a transaction record exits for which there is no corresponding master, display it as an error.
C. For all transaction records with corresponding master records (these are master records to be updated), add the amount of purchase from the transaction record to the amount owed in the master record and update the date of last purchase.
D. There need not to be a transaction record for each master record.
E. Transaction records are not in sequence.
Here are the record layouts.
CUSTOMER-TRANS
CUSTOMER-NO 5A
CUSTOMER-NAME 20A
DATE-OF-LAST-PURCHASE 8S
AMT-OF-PURCHASE 5S 2
CUSTOMER-MASTER
CUSTOMER-NO 5A
CUSTOMER-NAME 20A
DATE-OF-LAST-PURCHASE 8S
AMOUNT-OWED 6S 2
Read transaction record
Do until end of transaction file
Read master file by key
If no master record with that key, transaction error
Else do
Update master record fields
Rewrite master record
End-do
End-if
Read transaction record
End-do