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

How to decide number of output file in the program


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

New User


Joined: 04 Jan 2008
Posts: 15
Location: Pune

PostPosted: Wed Jan 14, 2009 5:44 pm
Reply with quote

Hi All,

We are writing one program in which we have one file as input in that file there are multiple logical files and we have to do some processing and write this logical file to separate flat files i.e our output file but we are not knowing that the number of logical file one input file can conatin so how can we decide the number of output file in the program??
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 14, 2009 5:46 pm
Reply with quote

Do you know the maximum number of output files that could possibly be required ? If so, then that is the answer.

If not, then the person who spec'd the program is possibly in the wrong job.
Back to top
View user's profile Send private message
khyati kumar

New User


Joined: 04 Jan 2008
Posts: 15
Location: Pune

PostPosted: Wed Jan 14, 2009 6:32 pm
Reply with quote

No we don't know the number of output file can't we allocate dynamically??
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 14, 2009 6:43 pm
Reply with quote

COBOL is a compiled language. It does not support dynamic allocation of files except in a very limited way -- you have to predefine the file to COBOL then at run-time you can see if it exists. You cannot create a file on the fly in COBOL.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Jan 14, 2009 7:10 pm
Reply with quote

Hi,

You might want to look at the following:

www.ibmmainframes.com/viewtopic.php?t=36363&highlight=dynamically
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 and retrive records f... DFSORT/ICETOOL 3
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
Search our Forums:

Back to Top