IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to split 4,000,000 records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jmreddymca
Warnings : 1

New User


Joined: 14 Oct 2007
Posts: 29
Location: Bangalore

PostPosted: Tue May 13, 2008 3:35 pm
Reply with quote

Hi Friends,

I have 1 flat file having 4,000,000 records. I want to split that into 4 different files. I tried it with sort skip & file also its not possible to me. I'm facing space & contention errors.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue May 13, 2008 8:31 pm
Reply with quote

jmreddymca,

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//OUT3 DD DSN=...  output file3
//OUT4 DD DSN=...  output file4
//SYSIN DD *
  OPTION COPY
  OUTFIL SPLIT1R=1000000,FNAMES=(OUT1,OUT2,OUT3,OUT4)
/*


Quote:
I'm facing space & contention errors.


Those really have nothing to do with DFSORT. You need to allocate each OUTn data set large enough to contain all of the records written to it. As for the contention problems, I don't know if you'll still have them with the job above, but if you do, again that's something you'll need to resolve yourself based on your environment.
Back to top
View user's profile Send private message
marygeorge

New User


Joined: 02 Jun 2008
Posts: 1
Location: chennai

PostPosted: Tue Jun 03, 2008 12:30 pm
Reply with quote

Hi,

I have a scenario like I have to split the input file into many output files depending on the number of records in the i/p file.

Here the situation is like the i/p record count can vary always.And in the o/p a single file can contain max of 60000 recods.

The above one should done through JCL.Please help me out.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jun 03, 2008 9:21 pm
Reply with quote

See the "Split a file to n output files dynamically" Smart DFSORT Trick at:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top