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

Can we use COPY for a few line of code ?


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

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Mon Sep 08, 2008 1:09 pm
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
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
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: 91
Location: Hyderabad

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

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Sep 08, 2008 4:46 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top