MIDRANGE dot COM Mailing List Archive



Home » WDSCI-L » September 2006

Re: Verifying SQL statement in RPG program.



fixed

Check the source member type.  It should be SQLRPGLE.


-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On 
Behalf Of David Foxwell
Sent: Monday, September 18, 2006 5:48 AM
To: Websphere Development Studio Client for iSeries
Subject: Re: [WDSCI-L] Verifying SQL statement in RPG program.

I can't even type /EXEC SQL in WDSc 5.1

As soon as I reach /EX, an error message tells me that the directive is
unknown. Can anyone help?

----- Message d'origine -----
De : "Michael Ryan" <michaelrtr@xxxxxxxxx>
À : "Websphere Development Studio Client for iSeries" <wdsci-l@xxxxxxxxxxxx>
Envoyé : vendredi 15 septembre 2006 20:28
Objet : Re: [WDSCI-L] Verifying SQL statement in RPG program.


Try putting a C before the +.

On 9/15/06, Alan Campin <Alan.Campin@xxxxxxxxxxxxxxxx> wrote:

I have SQL statements in an RPG IV program that look like this:

     C/EXEC SQL
      +  Declare C2 Cursor for
      +   select a.fitemf, b.wkctrf, sum(a.qtyrcf),
      +   sum(b.sslhuf), sum(b.slhtdf), sum(b.srlhuf * a.qtyrcf),
      +   sum(b.rlhtdf), c.pfdsc2
      +   from cstsum a join labeff b
      +   on a.ordnof = b.ordnof and a.fitemf = b.fitemf
      +   join facmstl0 c on b.wkctrf = c.pfidc2
      +   where a.ostatf between '45' and '55' and a.qtyrcf > 0
      +   and a.latdtf >= :SDATE and a.latdtf < :LRDATE
      +   and a.fitemf = :ITEM# and b.opstcf <> 00
      +   group by a.fitemf, b.wkctrf, c.pfdsc2
     C/END-EXEC

If I run this program through the compiler, everything compiles fine but
if I use the verify in WDSC, I get errors on each line with a "+".

     C/EXEC SQL
      +  Delete from LEADSWRK
RNF0257: Form-Type entry for main procedure not valid or out of
sequence.
     C/END-EXEC

Anyone else running into this? I am up to date with all fixes in V6.0.

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

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








Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact