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 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: 8165
Location: East Dubuque, Illinois, USA

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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6: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

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