Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 134
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: 134
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us