×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi Frank

Not sure if this will help get what we all want, but what I see in the pre-compiler output is a bunch of EVALs or MOVEs between fields names SQLnnn and the host variables. This is the linkage, AFAIK. I see these when I am in debug and use the SQL listing or some such debug view.

These MOVEs are all located close to the original embedded SQL statements (except maybe a character variable containing a prepared statement) that now appear as comments. I've never quite tried to do as you have, but I like the idea of saving source other than in QTEMP just for this purpose. Of course, it IS available when you use DBGVIEW(*SOURCE) on the CRTxxx.

HTH
Vern

At 04:18 PM 11/21/2007, you wrote:

HI Bill

Me too.
Wierd thing is I tried to save the generated SQL source to TOSRCFILE,
CRTSQLRPGI OBJ(MYLIB/MYPGM) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(MYPGM)
OBJTYPE(*PGM) REPLACE(*YES) TOSRCFILE(MYLIB/QSQLSRC).
When I open the source generated by the SQL precompiler the outline
view STILL is not helpful.
I can see no obvious link between the generated SQL data structures
and the files and fields that are being updated. Reading the generated
code I cannot understand how the SQL APIs know what to process.
The SQL precompiler is my pet peeve.

I use the FIND ALL function to find SQL field usages, but it is a
kludge compared to the outline view.
Frank Kolmann

>date: Wed, 21 Nov 2007 08:41:43 -0500
>from: "Bill Barnes" <bbarnes@xxxxxxxxxxxxx>
>subject: [WDSCI-L] Fields Used in SQL Statements
>When I look at the outline view and choose fields the :fields only find
>the D spec and not where they are used in an SQL program. I learned to
>put indicator variables in my Fetch Into fields to reduce the number of
>log entries. The outline view shows these as being defined but not
>used. Is this a feature and I should just live with it, or am I the
>only one to which this is happening?
>Bill Barnes
--
This is the Websphere Development Studio Client for iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-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-2026 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.