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



I don't know if this should go to this list, Midrange-L, or WDSc. But, since it has to do with embedded SQL, I picked you guys (and gals).

I have a current program that uses the following embedded SQL statement in free-format:

EXEC SQL
SELECT COUNT(*) INTO :COUNT FROM HISTORY/HSTLIN
WHERE DLITM# = :ITEM# AND DLDATE >= :LASTWEEK AND DLSQTY <> :EMPTY;

I was writing a quick and dirty, one-shot program that needed the same thing so, while typing the code using WDSc 7, I just copied and pasted the code into the new program from the old one. When I pressed the Enter key, the statement re-formatted itself with the embedded error message:

EXEC SQL
SELECT COUNT(*)
INTO :COUNT
FROM HISTORY / HSTLIN
WHERE DLITM# = :ITEM# AND
DLDATE > = :LASTWEEK AND
SQL0104 Token = was not valid. Valid Tokens: ( + - ? : DAY NOT RRN CASE CAST DATE DAYS HASH HOUR LEFT
DLSQTY <> :EMPTY;

Both source member types are SQLRPGLE. The program from which the code was copied has been in production for months. Notice that the re-formatted (erroneous) code embeds blanks around the library/file delimiter. It, also, inserts a blanks between the operands > and =. I tried to manually remove the embedded blanks, but, when I pushed the down-arrow (not Enter) the statement got re-formatted as illustrated.

We are on V5R4. Any idea what is going on here?

Thanks.

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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.