Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we use COPY for a few line of code ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Mon Sep 08, 2008 1:09 pm    Post subject: Can we use COPY for a few line of code ?
Reply with quote

Dear All,
Can anyone please answer me whether we can use COPY verb to copy a member which have few lines of source code instead of normal copybook for file structure or other variables.

will these stmts in side the member gets expanded during compile time.


Regards,
Deep
Back to top
View user's profile Send private message

birdy K

New User


Joined: 05 Mar 2008
Posts: 72
Location: chennai

PostPosted: Mon Sep 08, 2008 2:28 pm    Post subject:
Reply with quote

Yes. We can use. Corrections are welcome.
Back to top
View user's profile Send private message
Krishna Velamur

New User


Joined: 22 Aug 2008
Posts: 22
Location: Hyderabad

PostPosted: Mon Sep 08, 2008 3:10 pm    Post subject: Reply to: Can we use COPY for a few line of code ?
Reply with quote

Hi,
You can use copy if the lines of code doesn't contain any DB2 code (i.e embedded sql). If it contains then you need to include the member. Hope its clear. Corrections are welcome.
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Mon Sep 08, 2008 3:12 pm    Post subject:
Reply with quote

Thanks a Lot !!!!!!!!
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Mon Sep 08, 2008 4:46 pm    Post subject: Re: Reply to: Can we use COPY for a few line of code ?
Reply with quote

Krishna Velamur wrote:
Hi,
You can use copy if the lines of code doesn't contain any DB2 code

That's correct but you can precompile (DB2 and/or CICS) your piece of code and store the result in a COPY.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Sep 08, 2008 8:29 pm    Post subject:
Reply with quote

Quote:

That's correct but you can precompile (DB2 and/or CICS) your piece of code and store the result in a COPY.


and remember,
when you migrate to a new release of db2 or cics,
to re-precompile the copybooks.

but that could be avoided if you would INCLUDE instead of COPY, so that the precompiler would pick up the copymember.

does not the db2 precompiler generate a dbrm? If that is the only dbrm for the module, I guess you could get it thru a bind, but what if there is other sql in the module, which would generate an additional dbrm.

or do you only bind the dbrm that comes from the pre-compiler when the sql is in the copybook?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us