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
 
Split files into 4 equal parts

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

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Thu Jan 15, 2009 10:51 am    Post subject: Split files into 4 equal parts
Reply with quote

Hi,

I have a requirement wherein, i need to split a file into 4 equal parts.

There are no predefined conditions or anything for splitting up.
There is no dynamic input on how much splits.

One file - 4 splits. Obviously if the record count is not divisible by 4, the 4th split will have a lesser no. of records compared to other 3.

Can someone give a heads-on how this can be acheived?
Back to top
View user's profile Send private message

janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Thu Jan 15, 2009 10:54 am    Post subject:
Reply with quote

To clarify

if the i/p has 20 records,

output shud be

o/p1 - first 5 records
o/p2 - next 5 records
o/p3 - next 5
o/p4 - last 5 records

If the i/p has 23 records

o/p1 - first 6 records
o/p2 - next 6
o/p3 - next 6
o/p4 - remaining - in this case - 5 records
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jan 15, 2009 11:12 am    Post subject:
Reply with quote

Hello,

This has been asked multiple times previously. From those topics, here is the response:
Quote:
See the "Split a file to n output files dynamically" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Thu Jan 15, 2009 11:30 am    Post subject:
Reply with quote

Hi,

My bad. thanx.
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 Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 2 Fri Sep 22, 2017 6:00 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 Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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