MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

splitting a dataset into n datasets

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Wed Jan 14, 2009 11:19 am    Post subject: splitting a dataset into n datasets Reply with quote

hello,

i need to resolve this problem:

A batch application program could write into its output sequential dataset 1.000.000 records , but sometimes 2.000.000 records and sometimes 500.000 records and so on ...

the next jcl step executes a sort having in sortin = the output sequential dataset... and as sortout ... here we are the problem...

i need to split into 5 datasets the sortout in this way:
if records in sortin = 1.000.000 perform 1.000.000 / 5 = 200.000
and write 200000 records each 5 datasets.

if records in sortin dataset = 2.000.000 then compute 2.000.000 / 5 = 400.000 ... so write 400000 records in each sortout datasets.

now , if records in input = 500.000 .. SORT will write 100000 in sortout dataset.

how can i do?
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Jan 14, 2009 11:29 am    Post subject: Reply with quote

You can use the technique discussed in the "Split a file to n output files dynamically" Smart DFSORT Trick at:

www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Thu Jan 15, 2009 3:22 am    Post subject: Reply with quote

great! thanks a lot
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group