MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Usage of COPY statement in cobol

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mdisulaiman
Beginner


Joined: 14 Nov 2003
Posts: 17
Topics: 10

PostPosted: Sun Nov 16, 2003 3:14 am    Post subject: Usage of COPY statement in cobol Reply with quote

Hi All,

I want to know the usage of COPY in cobol pgm .Can any one give me an example
_________________
sulaiman
Back to top
View user's profile Send private message Send e-mail
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Sun Nov 16, 2003 12:20 pm    Post subject: Reply with quote

Hi

Why not reading the fine manual ?

O.
________
VANOS


Last edited by ofer71 on Sat Feb 05, 2011 11:08 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Wed Nov 19, 2003 10:38 am    Post subject: Reply with quote

The manual will give you the syntax, but maybe you have read that and want to know what sort of things people actually use COPY for.
Common examples:
1/ File layouts: All programs using a common file COPY in the same layout. If the layout changes, you recompile all the programs but you don't have to go through and change the source individually.
2/ Error handling: An application may have the same error handling requirements ing a number of programs - messages to display, dumps, recovery etc. so this may be suitable for copy code.
3/ Screen definitions: E.g. CICS maps - automatically generated copy code which you include in all programs using that screen
4/ Called program interfaces: A standard parameter definition for a called program and any programs which call it to use.

Basically, if you want a data definition or piece of code to be the same in more than one program, that piece of code is a candidate for a copybook.
Back to top
View user's profile Send private message
help_me
Beginner


Joined: 03 Oct 2003
Posts: 11
Topics: 4

PostPosted: Tue Dec 09, 2003 11:15 am    Post subject: Reply with quote

Hi,
COPY is similiar to that of we have in C & C++, #INCLUDE <>.
Rgds
SRinivas
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group