On 27-Mar-2014 11:20 -0700, James Franz wrote:
Recent move to V7R1. Compiling a production version of code,
and one of the SQL data structures missing, all the SQL_00xx
fields, but only for source that have /copy in D specs.
I did find thru google a recent reference (in German) to use
*LVL2 in the RPGPPOPT parm - and that works, which never had
to do before with same source. Could not find a PTF that
seemed related, and we are current.
Is this a known issue?
I have not seen any other discussions with regard to a change in the
effects for the IBM i 7.1 SQL pre-compiler, for use of that compiler
directive. That RPGPPOPT does have a /default/ value of *NONE, which
implies a customized version of the command may have been in effect on
the prior release. So a lack of proper system change management may
have lost that customization, a CHGCMDDFT, performed on that prior
release; i.e. the same customization was not re-instituted on the new
release for which the install caused the loss of the old customized *CMD
object, having been replaced with the new un-customized command.
FWiW: Like Scott suggests in another reply, I always used /INCLUDE
compiler directive, ever since having experienced an issue with /COPY.
A nuanced difference and the aforementioned compiler option are alluded
in the RPG docs, with redirect to the docs for embedded SQL, but the
actual links in the RPG docs [first two links below] are circular:
<
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzasd/sc09250847.htm#cdincl>
IBM i 7.1 Information Center -> Programming -> Programming languages ->
RPG -> ILE RPG Language Reference -> RPG IV Concepts -> Chapter 2.
Compiler Directives -> /COPY or /INCLUDE
_Using /COPY, /INCLUDE in Source Files with Embedded SQL_
"The /COPY and /INCLUDE directives are identical except that they are
handled differently by the SQL precompiler.
The way the /COPY and /INCLUDE directives are handled by the SQL
precompiler is different depending on the RPG preprocessor options
parameter (RPGPPOPT) specified on the CRTSQLRPGI command. Refer to
"Coding SQL statements in ILE RPG applications" in the Embedded SQL
Programming topic or the CRTSQLRPGI command in the CL topic for more
information.
For more information about these directives, see '/COPY or /INCLUDE'."
<
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzasd/sc09250844.htm#cdcopy>
IBM i 7.1 Information Center -> Programming -> Programming languages ->
RPG -> ILE RPG Language Reference -> RPG IV Concepts -> Chapter 2.
Compiler Directives
_i /COPY or /INCLUDE i_
"The /COPY and /INCLUDE directives have the same purpose and the same
syntax, but are handled differently by the SQL precompiler. If your
program does not have embedded SQL, you can freely choose which
directive to use. If your program has embedded SQL, see 'Using /COPY,
/INCLUDE in Source Files with Embedded SQL' for information about which
directive to use.
..."
The following SQL doc link has a title matching [identically to] the
referenced SQL doc from the RPG docs, but I have no idea how anyone
would know what about\from this link actually clarifies the alluded nuance:
<
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzajp/rzajprpgi.htm>
IBM i 7.1 Information Center > Database > Programming > Embedded SQL
programming
_Coding SQL statements in ILE RPG applications_
"You need to be aware of the unique application and coding requirements
for embedding SQL statements in an ILE RPG program. In this topic, the
coding requirements for host variables are defined.
..."
However one of the many sub-topics of the above doc link is the
following, with two of its sub-topics which do discuss the compiler
directives /COPY and /INCLUDE:
<
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzajp/rzajpembedirpg.htm>
IBM i 7.1 Information Center -> Database -> Programming -> Embedded SQL
programming -> Coding SQL statements in ILE RPG applications
_Embedding SQL statements in ILE RPG applications that use SQL_
"...
_Including code in ILE RPG applications that use SQL_
<
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzajp/rzajpincludecodeirpg.htm>
To include SQL statements and RPG specifications in ILE RPG
applications, use the SQL INCLUDE statement.
_Using directives in ILE RPG applications that use SQL_
<
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzajp/rzajpdirectivesirpg.htm>
RPG directives are handled by the SQL precompiler according to the value
of the RPG preprocessor options parameter (RPGPPOPT). If the RPG
preprocessor is used, the SQL precompile will run using the expanded
preprocessed source.
..."
As an Amazon Associate we earn from qualifying purchases.