IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SPLITR/DFSORT technique


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
itzphaniz

New User


Joined: 02 Sep 2005
Posts: 39

PostPosted: Wed Apr 02, 2008 8:10 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Apr 02, 2008 8:37 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 02, 2008 9:31 pm
Reply with quote

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
View user's profile Send private message
itzphaniz

New User


Joined: 02 Sep 2005
Posts: 39

PostPosted: Thu Apr 03, 2008 9:12 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 03, 2008 9:24 pm
Reply with quote

You can probably use the technique described in the "Split a file to n output files dynamically" Smar DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top