I am a novice AS/400 user and have been thrown into the lions den. I need to pull info from 4 files that have at least 1 common field. Regardless of using 1 or multiple tests I get a lot of duplicates. There has to be a way to not get them. Our former and now deceased AS/400 guru did queries all of the time with no problem. Any help would be appreciated. I'm going bald trying to figure it out!!
Unfortunatly there is only one field in the primary that has the same data as the other 3 files. It is only making one duplicate now and I can just have excel remove them. :(
I'd pick one of the duplicate items and see if there are multiple instances of it in each of the 4 files individually. That may point you to the problem file where you may need to refine your join and or select to get just single occurrences.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 5  Replies
Looks like you are using Query/400 (WrkQry)
The Sort and Summary functions can be used to eliminate duplicates.
Sometimes it's necessary to make a series of queries .. each creating an output file which is an input to the next process.