I Have 3 files. The customer file has customers who never ordered or had an invoice. We want to remove those customers from the customer file. I have 2 rpg programs one for each (orders, invoice) files. They create 2 temp outfiles which have those records that we want to Purge.
I want to merge these 2 files. There are duplicates in this sense:
Customer number Suffix 123456 000 123456 001 123456 002 567890 000
Suffix can be there if the customer contacted us a second time, etc.
SO both outfiles can have these dupes.
I would like to have a final file that only has the customer number.
BUt I want to do this automatically, in a CL.
Can this be done in a CL, rather than a ad hoc SQL?