View previous topic :: View next topic
|
Author |
Message |
jmreddymca Warnings : 1 New User
Joined: 14 Oct 2007 Posts: 29 Location: Bangalore
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
marygeorge
New User
Joined: 02 Jun 2008 Posts: 1 Location: chennai
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|