Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SPLITR/DFSORT technique

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: SPLITR/DFSORT technique
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: 2150
Location: At my coffee table

PostPosted: Wed Apr 02, 2008 8:37 pm    Post subject:
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 Moderator


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

PostPosted: Wed Apr 02, 2008 9:31 pm    Post subject:
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    Post subject:
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 Moderator


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

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

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

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us