×
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.
This problem was discussed a couple of months ago on the WDSC list. This
is a bug in the auto formatting of the LPEX editor for SQL. You have to
turn off auto formatting for SQL or change it in SEU.
Thanks
Bryce Martin
Programmer/Analyst I
Ext. 4777
Jerry Adams <Jerry@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/31/2009 10:04 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
"Midrange-RPG (rpg400-l@xxxxxxxxxxxx)" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Embedded SQL Reformatting Problem
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 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.