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: 1224
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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