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

How to allocate files dynamically in COBOL?


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

New User


Joined: 04 Jun 2006
Posts: 6
Location: Charlotte, NC

PostPosted: Wed May 06, 2009 11:13 am
Reply with quote

Hi,

I have a question on file handling in COBOL. How can we dynamically allocate flat files inside COBOL depending upon logic?

Say for example, I have a huge i/p file and want to split into x number of files using cobol and then process the same in next job or step. If I know the record count will be y and can split into 10 files, then my x = y/10 records which means 10 files are enough. If in case, my i/p comes as z which is way higher than y. then I might need to split into 20 files. so , I want to allocate files dynalically inside cobol to meet this criteria.

Can anyone please help me resolve this?

Also, please share your thoughts on the performance of my program if I have such dynamic allocations.

Thanks for being of great help!
- Beginner.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 06, 2009 7:34 pm
Reply with quote

Search here for the "ikjtsoev", "bpxwdyn", or "putenv" programs. You'll find a lot of topics with all sorts of different ideas.
Back to top
View user's profile Send private message
navit_1980

New User


Joined: 04 Jun 2006
Posts: 6
Location: Charlotte, NC

PostPosted: Thu May 07, 2009 1:46 am
Reply with quote

Thanks a lot for this pointer!
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top