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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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