View previous topic :: View next topic |
Author |
Message |
mdisulaiman Beginner
Joined: 14 Nov 2003 Posts: 17 Topics: 10
|
Posted: Sun Nov 16, 2003 3:14 am Post subject: Usage of COPY statement in cobol |
|
|
Hi All,
I want to know the usage of COPY in cobol pgm .Can any one give me an example _________________ sulaiman |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Sun Nov 16, 2003 12:20 pm Post subject: |
|
|
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 |
|
 |
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Wed Nov 19, 2003 10:38 am Post subject: |
|
|
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 |
|
 |
help_me Beginner
Joined: 03 Oct 2003 Posts: 11 Topics: 4
|
Posted: Tue Dec 09, 2003 11:15 am Post subject: |
|
|
Hi,
COPY is similiar to that of we have in C & C++, #INCLUDE <>.
Rgds
SRinivas |
|
Back to top |
|
 |
|
|