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

How to split file depending on input record count.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Wed Nov 21, 2007 9:59 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 10:06 am
Reply with quote

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
View user's profile Send private message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Wed Nov 21, 2007 10:14 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 11:26 am
Reply with quote

sudip,

Check the topic "split a file into n output files dynamically" in the below mentioned link.

http://www-304.ibm.com/jct01004c/systems/support/storage/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Nov 22, 2007 5:29 am
Reply with quote

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
View user's profile Send private message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Thu Nov 22, 2007 9:30 am
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top