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 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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


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