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 file depending on input record count.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to split file depending on input record count.
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: 1288
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 10:06 am    Post subject: Reply to: how to split file depending on input record count.
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    Post subject: how to split file depending on input record count.
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: 1288
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 11:26 am    Post subject: Reply to: How to split file depending on input record count.
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: 1703
Location: Australia

PostPosted: Thu Nov 22, 2007 5:29 am    Post subject: Reply to: How to split file depending on input record count.
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    Post subject: How to split file depending on input record count.
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 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


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