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
 

 

Split to include the all the reocrds for last key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Sat Jan 22, 2011 12:04 am    Post subject: Split to include the all the reocrds for last key
Reply with quote

Hi All,

I have written a reporting program.It works fine when the number of records in the input are around 100,000.Our input file has more that 1,300,000 records.There are duplicates records corresponding to a key.Is there any way to split the file so that we can always include all the records for the last key and the next split should start with next key.

For example
Input is
A 1
A 2 ---------> 100,000 records
A 3
B 1
B 2
B 3

When we do a split by 100,000
Output of split should be is
Split 1
A 1
A 2
A 3

Split 2
B 1
B 2
B 3

There is no limit on the number of records that we can have for a particular key.


Can we do it using sort?

Thanks in Advance.
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: Sat Jan 22, 2011 2:31 am    Post subject:
Reply with quote

It's not at all clear to me what it is you want to do.

A 1
A 2 ---------> 100,000 records
A 3

There appears to be 100002 records for this key, so what does that have to do with splitting by 100000?

How many output files are you expecting? What is the RECFM and LRECL of the input file?

And most importantly, what are the "rules" for splitting the input records to the output files?

You need to do a better job of explaining what you want to do before I can help you.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Sat Jan 22, 2011 3:13 am    Post subject:
Reply with quote

Hi Frank,

The input file may have up-to 1,300,000 record.So, I need to split them in 13 parts.The problem is that there are duplicates records corresponding to a key.If I directly split them by 100,000 then I might miss some of the data for the last key and it will again included in next file.

RECFM=FB and LRECL = 213.

There is only one Rule :- Splitted file should have all the records for the last key that is on 100,000 .................1,300,000 record and it should not be included in next split.
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: Sat Jan 22, 2011 4:25 am    Post subject:
Reply with quote

See my last post at:

http://ibmmainframes.com//viewtopic.php?t=18842

which shows a method for doing what you want which you can adapt.
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 Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


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