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

Cobol to accept copybook dynamically


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

New User


Joined: 30 Jan 2006
Posts: 35
Location: Richmond

PostPosted: Mon Oct 27, 2008 6:35 am
Reply with quote

Is it possible to accept a copybook dynamically thru a cobol program?

My idea s as follows

Give the copybook thru SYSIN or a file. Program should use this layout for reading another file. Does it sounds interesting??

If yes, please share your ideas
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Oct 27, 2008 6:43 am
Reply with quote

COBOL is a compiled language where files have to be defined during the compile process. It is not possible to specify at run time the record length that is required at compile time. You can specify files dynamically at run time in Assembler but not in COBOL.

So your idea may be very interesting but it is not possible to do this in COBOL. Try it in a different language or give up the idea altogether.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top