View previous topic :: View next topic
|
Author |
Message |
itzphaniz
New User
Joined: 02 Sep 2005 Posts: 39
|
|
|
|
I’m using SPLITR technique to split the input file. But I want the output data to be contiguous and split by the count of the input file.
Here is my SYSIN
Code: |
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLIT1R=100 |
If my input has 305 records. The above control card is writing 105[100+5] records in OUT1, 100 in OUT2 and OUT3
I want to split based on the count of input file. If input has 305 records, then continuous 101 records in OUT1, next 101 records in OUT2, and the remaning 103 records in OUT3? Is it possible using SPLIT1R technique? IF not, anyway to split the file using any SORT technique |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Have you looked up thr "Five ways to split a data set" chapter in Frank's "Smart DFSORT Tricks"?
Did you look up the function of SPLIT, SPLITBY, or SPLIT1R?
Me thinks that you can get what you want with a SPLIT1R=101..... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
If my input has 305 records. The above control card is writing 105[100+5] records in OUT1, 100 in OUT2 and OUT3 |
No, it won't.
What you describe is what would happen with SPLITBY=100, not with SPLIT1R=100.
With DFSORT
Code: |
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLIT1R=100
|
you will get records 1-100 in OUT1, 101-200 in OUT2 and 201-305 in OUT3.
If you use
Code: |
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLIT1R=101
|
you will get records 1-101 in OUT1, 102-202 in OUT2 and 203-305 in OUT3. |
|
Back to top |
|
|
itzphaniz
New User
Joined: 02 Sep 2005 Posts: 39
|
|
|
|
CICS Guy-
Yes i looked at the techniques.
Frank-
It was a mistake on my part. Typo error. Sorry. My input count is not fixed. It varies. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|