View previous topic :: View next topic
|
Author |
Message |
khyati kumar
New User
Joined: 04 Jan 2008 Posts: 15 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
khyati kumar
New User
Joined: 04 Jan 2008 Posts: 15 Location: Pune
|
|
|
|
No we don't know the number of output file can't we allocate dynamically?? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
Back to top |
|
|
|