× 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.



Use /copy instead if you need the pre-compiler to see it.

Charles

On Tue, Oct 20, 2009 at 3:56 PM, <jdavis@xxxxxxxx> wrote:
If I am not mistaken, the SQL pre-compiler does not reconize the /Include

Jeff Davis
Programmer
Dental Network of America
2 Transam Plaza Drive, Suite 500
Oakbrook Terrace, IL. 60181
630.691.0336




"Coyle, Stephen F." <SCoyle@xxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/20/2009 02:54 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Embedded SQL Fails on JOIN






OK...you are correct...I tested by hard coding the field lengths instead
of using the LIKE keyword...
It ran fine and the code in the compile list confirmed that all 7 fields
were being recognized...

Thanks to all for your help...I couldn't stare at it by myself any
longer....

A quick follow up question...

What determines if the pre-compiler can see the definition of a field or
not?
Obviously the program compiled fine so the definition of My0006.McRp17 was
available.

Here is how the definitions were brought in:
    (I0006 DS is brought in by /Include)
                D My0006          Ds                  LikeDS(I0006)   INZ

                D My57755U      E Ds                  ExtName(F57755U)
Qualified
                D Based(TEMPLATE_ONLY)

Again, thanks to everyone for your help and suggestions...in the future I
will remember to check the code inserted by the pre-compiler, I always
just took that for granted..

- Steve

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Charles Wilt
Sent: Tuesday, October 20, 2009 3:17 PM
To: RPG programming on the IBM i / System i
Subject: Re: Embedded SQL Fails on JOIN

The definition of My0006.McRp17 isn't available to the pre-compiler.

Charles

On Tue, Oct 20, 2009 at 3:04 PM, Coyle, Stephen F. <SCoyle@xxxxxxxxxxxxx>
wrote:
This what I've found...these snippets were copied directly from the
compile listing...
The code inserted by the pre-compiler is only returning 6 fields but the
select statement is calling for 7.
The error message now makes sense to me. But I still do not understand
why it is dropping the last field.
Does anyone have any ideas why the compiler would do this?

D IPDs            Ds                  INZ
D   IP$BC                             Like( My57755U.Re$BC   )
D   IPAn8                             Like( My57755U.ReAn8   )
D   IPEftjx                           Like( My57755U.ReEftjx )
D   IPEnddx                           Like( My57755U.ReEnddx )
D   IPMcu                             Like( My57755U.ReMcu   )
D   IP$OPS                            Like( My57755U.Re$OPS  )
D   IPRp17                            Like( My0006.McRp17    )

052900   //****SQL
053000   //****clare ReadCsr CURSOR FOR
053100   //****elect  Re$BC, ReAN8, ReEftjx,
053200   //****       ReEnddx, ReMcu, Re$OPS, Mcrp17
053300   //****       From Qtemp/F57755U
053400   //****       Left Outer Join F0006
053500   //****       on TRIM(ReMcu) = TRIM(McMcu)
053600   //****       Order by McRP17, Re$BC, ReAn8   ;

056800   //****SQL
056900   //****tch Next From ReadCsr Into :IPDs :NullInds ;
056900  /END-FREE
056900 C                   Z-ADD                      -4
 SQLER6
056900 C                   CALL                       SQLROUTE
056900 C                   PARM
SQLCA
056900 C                   PARM
SQL_00012
056900 C     SQL_00015     IFEQ                       '1'
056900 C                   . EVAL                     IP$BC = SQL_00017
056900 C                   . EVAL                     IPAN8 = SQL_00018
056900 C                   . EVAL                     IPEFTJX =
SQL_00019
056900 C                   . EVAL                     IPENDDX =
SQL_00020
056900 C                   . EVAL                     IPMCU = SQL_00021
056900 C                   . EVAL                     IP$OPS = SQL_00022
056900 C                   . EVAL                     NULLINDS(1) =
SQL_00023
056900 C                   . EVAL                     NULLINDS(2) =
SQL_00024
056900 C                   . EVAL                     NULLINDS(3) =
SQL_00025
056900 C                   . EVAL                     NULLINDS(4) =
SQL_00026
056900 C                   . EVAL                     NULLINDS(5) =
SQL_00027
056900 C                   . EVAL                     NULLINDS(6) =
SQL_00028
056900 C                   END

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




HCSC Company Disclaimer

The information contained in this communication is confidential, private,
proprietary, or otherwise privileged and is intended only for the use of
the addressee.  Unauthorized use, disclosure, distribution or copying is
strictly prohibited and may be unlawful.  If you have received this
communication in error, please notify the sender immediately at (312)
653-6000 in Illinois; (800)835-8699 in New Mexico; (918)560-3500 in
Oklahoma; or (972)766-6900 in Texas.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.