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

Where to store the member used in COPY Verb


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

New User


Joined: 24 Jul 2005
Posts: 28

PostPosted: Sun Aug 21, 2005 11:09 pm
Reply with quote

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
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Mon Aug 22, 2005 8:24 am
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Mon Aug 22, 2005 11:25 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Nov 14, 2006 5:03 pm
Reply with quote

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
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 7:05 pm
Reply with quote

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
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Tue Nov 21, 2006 1:11 am
Reply with quote

Agree to all said above except COPY IS A VERB. Copy is not a verb its a
library statement.

David P.
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Thu Sep 27, 2007 4:41 pm
Reply with quote

so can we use COPY statement in Environment division?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 27, 2007 4:51 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 27, 2007 10:06 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 28, 2007 12:07 am
Reply with quote

IBM, in their COBOL manual calls "COPY" a "Compiler Directing Statement".
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 Store the data for fixed length COBOL Programming 1
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top