Please use my "[login to view URL]" as CLOSE as possible EVEN if you have a more effective way or efficient way of completing the program. I would prefer if you compile with IBM JCL COBOL but I am OK with whatever compiler you use like OpenCOBOL (open source COBOL for Linux) to make it work. I will translate your working COBOL code to my IBM JCL standard.
This program has 4 files. 2 for Input ([login to view URL]),([login to view URL]) and 2 for Output. The Output files should look like the 2 examples I uploaded named ([login to view URL]), ([login to view URL]) - Feel free to rename the txt files to make my program finish filling out the TABLE as described in steps A) to H). My 2 partially completed output files is how far I've gotten with my code.
One of the input files ([login to view URL]) has the data to fill the table. The other ([login to view URL]) has the customer transactions.
One of the output files ([login to view URL]) will contain the output report. The other ([login to view URL]) will contain the unmatched transactions - if any.
You will need to:
A) Open the files
B) Write the headers (already done)
C) Read a transaction
D) Search the table for a match with the transaction - match the UPC
E) If a match found computer the bill etc - move data to the output line and write
F) If no match found write the transaction to the Error/BAD file
G) Repeat letters "C) through F)" until all transactions are processed
H) Close the files and exit