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 decide number of output file in the program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to decide number of output file in the program
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jan 14, 2009 5:46 pm    Post subject:
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    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Wed Jan 14, 2009 6:43 pm    Post subject:
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    Post subject:
Reply with quote

Hi,

You might want to look at the following:

http://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    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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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