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
 

 

Splitting a file based upon volume of data

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

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Tue Sep 07, 2010 1:12 pm    Post subject: Splitting a file based upon volume of data
Reply with quote

Hi,

I have a requirement like this:

I/P file:
Code:

STORE1    XXXX
STORE1    XXXX
STORE1    XXXX
STORE1    XXXX
STORE2    XXXX
STORE2    XXXX
STORE3    XXXX
STORE3    XXXX
STORE3    XXXX
STORE3    XXXX
STORE3    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE5    XXXX
STORE5    XXXX
STORE6    XXXX
STORE6    XXXX
STORE7    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX


O/p files:

File1:
Code:

STORE1    XXXX
STORE1    XXXX
STORE1    XXXX
STORE1    XXXX
STORE2    XXXX
STORE2    XXXX


File2:
Code:

STORE3    XXXX
STORE3    XXXX
STORE3    XXXX
STORE3    XXXX
STORE3    XXXX


File3:
Code:

STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX
STORE4    XXXX


File4:
Code:

STORE5    XXXX
STORE5    XXXX
STORE6    XXXX
STORE6    XXXX
STORE7    XXXX


File5:
Code:

STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX
STORE8    XXXX


Rules for getting the O/P are:

We need to check the store(s) for which number of records is less than/equal to 6 then those records should go in one file. if sum of records for stores( say two stores in number) is exceeding than 6 then first store's records will go in one file and the records of 2nd store will be considered for number of records with next store. Maximum number of o/p files can be 10. suppose 9 files are already created then the 10th file will contain all the rest of records.

Can anybody please help me in this? I hope the requirement is clear.

Thanks
Back to top
View user's profile Send private message

sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Wed Sep 08, 2010 3:37 am    Post subject:
Reply with quote

GaganGarg,
Are you Ok with creating empty files incase you have less number of records?

Is there a limit to max. number of records in a singlefile for given Store Number? For Example, if you have 1000 records for STORE8, would you have them all in your FILE5? If not, how would you like to split them?

Thanks,
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 132
Location: India

PostPosted: Wed Sep 08, 2010 9:06 am    Post subject:
Reply with quote

Hi sqlcode1,

Thanks for the reply.
Quote:

Are you Ok with creating empty files incase you have less number of records?


Yes, that will be absolutely fine. not a problem at all.

Quote:

Is there a limit to max. number of records in a singlefile for given Store Number? For Example, if you have 1000 records for STORE8, would you have them all in your FILE5? If not, how would you like to split them?


There is no limit on the number of records for a given store in a file. in the case you mentioned here, we can have all 1000 records for store8 in FILE5.

thanks
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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