View previous topic :: View next topic
|
Author |
Message |
mainframe_techie
New User
Joined: 15 Jul 2007 Posts: 23 Location: India
|
|
|
|
Hi,
I am trying to split a file into 5 files.
I am using SPLITBY function.
Here are the sample input file records:
<T> BEST1 <T
<T> BEST2 <T>
<T> TEST <T>
<T> TEST1 <T>
<T> TEST1 <T>
<T> TEST1 <T>
<T> TEST1 <T>
<T> TEST1 <T>
The out put file have :
O/P 1 is :
<T> BEST1 <T>
<T> TEST1 <T>
O/P 2 is :
<T> BEST2 <T>
<T> TEST1 <T>
and so on.
The sort card is
//TOOLIN DD *
COPY FROM(DETAILS) USING(CTL1)
/*
//*
//CTL1CNTL DD *
OUTFIL FNAMES=(FILE2,FILE3,FILE4,FILE5,FILE6),SPLITBY=1
Actually I need 1 record in each file. Can anybody please let me know why this is happeing and how can I acheive what I need ??
Thanks,
mainframe_techie |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to post better examples.
Create a wider variety of input data and more than 8 records. Make sure that the records are not just repeats - the way you have defined the data causes confusion when you look at the output. Also make sure that there are no typo's - i believe your first test record is missing the ending ">".
If you only put 1 record in each output file, what about the records that are "left over"?
I believe the reason you see the output you are seeing is because the splitby you specified puts 1 record in each output file and then starts again at file 1. This continues in rotation until all of the input has been copied into the 6 output files. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
mainframe_techie
Look at the Split a file to n output files dynamically and Five ways to split a data set Smart DFSORT Tricks at
www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Iin case you need any help:
1. then post the sample set of i/ps with the record numbers, and which record should go to which o/p file?
meant to say,do you want to split the i/p based on any rule?
2. You want to split in to how many o/p file's |
|
Back to top |
|
|
|