Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us