× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jerry,

have you tried to embedd the copy members to embed with /INCLUDE instead of
/COPY.
If you use /INCLUDE the SQL precompiler will ignore them and only the
language compiler will consider them.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Jerry Adams
Gesendet: Monday, 21. September 2009 23:04
An: RPG programming on the IBM i / System i
Betreff: RE: SQL Pre-compiler Fields Names Undefined

The $Msg copy member has two parts: D-specs and C-specs. The copy of the
appropriate part of the member is conditioned by:
D/Define MsgD
D/Copy $Msg
And
C/Define MsgC
C/Copy $Msg

I took the D-spec section and blatantly copied it into the program member so
that the D/Define MsgD and D/Copy $Msg directives were no longer employed.
I left the C-spec directive alone (i.e., the compiler did the copying). The
program compiled.

Then I physically split off the D-spec portion of the copy book so that the
only thing it has is D-specs; no /if, no /endif, nada. It too compiled.

The only directives in the copy book were:

/if defined(MsgD)
/undefine msgd
/endif
/if defined(MsgC)
/endif

The working program of mine to which I alluded earlier had a copy book for a
prototype, but not the $Msg copy book or anything else that used /if,
/endif. I tried re-positioning the /
D/Define MsgD
D/Copy $Msg
At the end of the D-specs, but the program still refused to compile. I
tried that because, as I said earlier, the C/Define MsgC, C/Copy $Msg stuff
is still in the main program source member (subroutines) just before the
procedures, and the program compiled even though the /if, /endif stuff is
still in the copy book.

Color me confused, but relieved. Now to test this puppy. (I'm a glutton
for punishment.)

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jerry Adams
Sent: Monday, September 21, 2009 3:21 PM
To: RPG programming on the IBM i / System i
Subject: RE: SQL Pre-compiler Fields Names Undefined

Well, I have a couple of /copy members, but none of them use /eof; one
($Msg) does use a /define and /if /endif. But I'll try just copying and
pasting the code straight into the main source member and see what happens.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Brian Johnson
Sent: Monday, September 21, 2009 3:07 PM
To: RPG programming on the IBM i / System i
Subject: Re: SQL Pre-compiler Fields Names Undefined

On Mon, Sep 21, 2009 at 12:49 PM, Jerry Adams <Jerry@xxxxxxxxxxxxxxx> wrote:

Yes, Birgitta, it is missing the entire SQLCA. I had not noticed this
before, but I have global D-specs defined.




I managed to achieve this result once by using the
/EOF<http://127.0.0.1:2592/help/topic/com.ibm.etools.iseries.langref.doc/c09
2508670.htm#HDRCDEOF>directive
in a /copy member. After SQL precompiler resolved the /copy
statements, the /eof applied the rest of the temporary member, including the
SQL-generated code. I worked around the problem by replacing /eof with
/if.../endif.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.