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



Just wondering... does it work if you put a C in position 6 of every line?
It may be that WDSC is a little stricter about requiring a specification
type in non-freeform SQL.

Joe

From: Alan Campin

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



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.