View previous topic :: View next topic
|
Author |
Message |
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
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 |
|
|
birdy K
New User
Joined: 05 Mar 2008 Posts: 72 Location: chennai
|
|
|
|
Yes. We can use. Corrections are welcome. |
|
Back to top |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
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 |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Thanks a Lot !!!!!!!! |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|