I have a requirement where I need to select a particular set of records into 1 file and remaining into another file. Can I achieve this in a single step.
Input File:
A 111111111
A 222222222
B 111111111
C 111111111
A 777777777
D 666666666
I need all records starting with 'A' in one file and remaining in another file.
Outfile 1 :
A 111111111
A 222222222
A 777777777
Outfile 2:
B 111111111
C 111111111
D 666666666
Is there a direct method instead of using select statements with 2 control cards. It'll be helpful if I can do it in one single step where I give an include condition for one case for all the records to go into output file 1 and in the same step rest of the records will go to output file 2 also. Please help.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
But I need only the OUT1 file to be sorted. I think the above mentioned method sorts both the files.
And was I supposed to know that by reading your mind? Please try to be more clear in your requirements in the future so we don't waste your time or mine.
If you want to sort the 'A' records, but not the 'B' records, you have to use two passes. Here are two ways to do that with DFSORT/ICETOOL: