View previous topic :: View next topic
|
Author |
Message |
sudip_ghanvat
New User
Joined: 05 Apr 2007 Posts: 15 Location: pune
|
|
|
|
There is a file which contains large number of records. I want to split that file into many files with each file will contain 2000 records only. Now problem is we don't know how many records that input file will contain.
So how we can split it into different files? How we can decide no. of output files required?
Please do let me know if you have any suggestions. Is it possible in cobol icetool or clist.
Thanks,
Sudip |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Sudip,
Yes this is possible using DFSORT. Search the DFSORT forum with the keyword "split" for similar topics.
Else post the record format, input count for the JCL. |
|
Back to top |
|
|
sudip_ghanvat
New User
Joined: 05 Apr 2007 Posts: 15 Location: pune
|
|
|
|
Hi aaru ,
Actually problem is we dont know exact record count in input file.
Input file is generated daily in prduction cycle.so daily count is different.
In dfsort if we know exact count we will do but unknown count how is it possible? We can't define fix no of output file in this situation
Let me know if u want more information.
Thanks,
sudip. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Aru,
as the number of records is not known, I'm not sure that splitting the files dynamically is the way to go.
If the total number of records is 10 million, it would require 5000 DDNAMEs which will exceed the maximum number of DD's allowed.
In a case like this I think some code will be required to generate the correct number of jobs/steps required after obtaining the number of records in the file.
Once the files are created, how are they going to be referenced ?
Maybe the same code can generate the jobs/steps required to read the split files.
Gerry |
|
Back to top |
|
|
sudip_ghanvat
New User
Joined: 05 Apr 2007 Posts: 15 Location: pune
|
|
|
|
Gerry ,
I are right i have same doubts in the mind.If any one have similar
type code.Please provide me.
Thanks,
sudip Ghanvat. |
|
Back to top |
|
|
|