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

Split to include the all the reocrds for last key


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Sat Jan 22, 2011 2:31 am
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
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 Developer


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

PostPosted: Sat Jan 22, 2011 4:25 am
Reply with quote

See my last post at:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL/SORT to Split Records SYNCSORT 28
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
Search our Forums:

Back to Top