No clue why it does this inspite of telling the SORT to maintain the ascending order...!! Isn't it crazy!
No it is not. You may wants to read more on SPLIT operator.
This is how it works....
The first sorted record is written to the OUT1 data set, the second sorted record is written to the OUT2 data set, the
third sorted record is written to the OUT3 data set, the fourth sorted record is written to the OUT1 data set, and so
on in rotation.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
sudarshan.srivathsav wrote:
Bill,
I need the entire data in the input file to be into three chunks after maintaining the order.
SORT FIELDS is a mandatory key word when you run the SPLIT, I also tried using SORTFIELDS=COPY, it gives me the same output.
Not sure what you mean one of them will have what you want!! I need all the three files in the same order ..
I'd be very interested to see supporting documentation for your idea that "SORT FIELDS is a mandatory key word when you run the SPLIT". Especially as you immediately contradict yourself.
Looking for SPLIT's cousins, means looking in the manual where SPLIT is documented and discovering that there is more than one type of SPLIT. SPLIT is doing what it is supposed to do, not what you want it to do.
So SPLIT is not crazy, Using a function which does something other than you want, and then complaining, I can leave you to characterise for yourself.
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
Do you realise that Syncsort is a product of Syncsort Corporation and not of IBM? IBM's sort offering is DFSort and it has many more ways to split a file than the 2 that you ascribe to Syncsort. check out the DFSort Tricks publication in the DFSort part of the forum.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Crazy, eh? Unless you have a massively old SyncSort, I don't know what your problem with reading the documentation is.
SPLITBY1R=n
Now, since you have never made it clear, that still may no do for you. In which case you'll need to provide some code to SORT.
So. Have a look at SPLITBY1R. If that is not good for you, explain, fully, what you want to do, provide representative sample input and expected output, RECFM, LRECL.