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
 

 

How to split one file into 5 files

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

New User


Joined: 05 Jun 2006
Posts: 51
Location: Bangalore,India

PostPosted: Wed Apr 11, 2007 9:15 pm    Post subject: How to split one file into 5 files
Reply with quote

Hi,

I have one requirement where one file has to be splitted into 5 files.I dont have any conditions just need to split it .

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

Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Apr 11, 2007 10:03 pm    Post subject:
Reply with quote

Harsha,

See if the "Split a file to n output files dynamically" Smart DFSORT Trick will do what you need:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

If not, then provide more details of what exactly you want to do.
Back to top
View user's profile Send private message
jagankallis
Warnings : 1

New User


Joined: 28 Jun 2006
Posts: 29
Location: DUISBURG

PostPosted: Thu Apr 12, 2007 4:01 pm    Post subject: Re: How to split one file into 5 files
Reply with quote

Harsha,

Code:
//S010    EXEC PGM=ICETOOL
//TOOLMSG  DD  SYSOUT=*                                         
//DFSMSG   DD  SYSOUT=*                                         
//CNT1CNTL DD  *                                                 
  OUTFIL FNAMES=(OUT1,OUT2,OUT3,OUT4,OUT5),                           
      SPLIT                                                     
/*                                                               
//INDD    DD DISP=SHR,DSN='INPUT FILE'   
//TOOLIN  DD *                                                   
  COPY FROM(INDD) USING(CNT1)                                   
/*                                                               
//OUT1   DD  DSN='OUTPUT FILE1'
//OUT2   DD  DSN='OUTPUT FILE2'
//OUT3   DD  DSN='OUTPUT FILE3'
//OUT4   DD  DSN='OUTPUT FILE4'
//OUT5   DD  DSN='OUTPUT FILE5'


Hope this helps !
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu Apr 12, 2007 4:46 pm    Post subject: Re: How to split one file into 5 files
Reply with quote

Just curious ....

let's say You have a file with 10 000 000 ( ten millions ) records

then it' s the same thing to split it in :
5 files containing 2 000 000 ( two millions ) records each,
4 files containing 1 ( one ) record each and one slightly bigger containing
9 999 996 ( nine millions nine hundred ninety nine thousands nine hundred ninety six ) records ....

right ?!?

regards

P.S

wondering about the logic of the question ...
and the bandwidth waste
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu Apr 12, 2007 8:31 pm    Post subject:
Reply with quote

Harsha,

Note that the DFSORT Trick I pointed to will create output files with contiguous input records, whereas the method Jagannathan shows will create output files with non-contiguous input records.

For more methods to split a file, see the "Five ways to split a data set" 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
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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11: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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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