View previous topic :: View next topic
|
Author |
Message |
harinatha
New User
Joined: 24 Jul 2005 Posts: 28
|
|
|
|
Hi,
How to use COPY Verb.
Assume that Iam having cobol program M275203A1M, Which is in the PDS Panvalet.Master
In the Above program(M275203A1M) Contains Copy verb like this
Copy STORE-ST
Then Where do i need to save this member STORE-ST
Thanks & Regards,
Hari. |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
The copy verb is generally used to include copy books in u r program.see where u r copy books are stored and save the member there. |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
As Vijayamadhuri mentioned "The copy verb is generally used to include copy books in u r program". Whenever you compile your cobol program it will link with copybook (which you can see in you extrated program)
Generally Test program link with test copybook and Prod with Prodcopybook.
Regards
Rupesh |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
1. COPY is not a verb...........................
2. the copy members need to be in a PDS which is part of the SYSLIB concatenation. |
|
Back to top |
|
|
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
Hi..,
COPY verb is used to include the Copy book into the program
COPY BOOK usually contains the variable decarations, and files record layout, if the same record layout is using in more programs, then instead of writing in all the programs we usually write that in the separate member of the PDS and we will include that member in the program
Ex:-
COPY COPYBOK1
this will expand during the compilation
these copy books usually we store in the separate PDS for COPYB BOOKS
example of the PDS for the Copy book
TEST.COBCOPY in this COPYBOK1 is the member
while compiling we should give both(Copy book and program)libraries otherwise comiplation will fail |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Agree to all said above except COPY IS A VERB. Copy is not a verb its a
library statement.
David P. |
|
Back to top |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
so can we use COPY statement in Environment division? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
so can we use COPY statement in Environment division? |
Why don' t You try and give us the result ???
regards
e.s |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Then Where do i need to save this member STORE-ST |
The member should be stored in the "copylib" that is used for your project. If you ask someone on your project or the system support people, they can tell you which dataset your COPY members should be be stored in.
As DBZ mentioned, it will be in the SYSLIB concatenation of the compile JCL. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
IBM, in their COBOL manual calls "COPY" a "Compiler Directing Statement". |
|
Back to top |
|
|
|