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



The token CLIENT is now a SQL reserved word, since V6R1.
http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/db2/rbafzwordsre.htm
That documentation and prior releases warn that SQL reserved words "may be _added at any time_. For a list of additional words that may become reserved in the future, see the IBM® SQL and ANSI reserved words in the IBM SQL Reference Version 1 SC26-3255." Apparently the V5R4 system has the code [it only takes one PTF] to start enforcing that new keyword; not to imply the function itself is available at that release.

Quoting the token to ensure the SQL knows it is a column name versus a function [or other reserved & conflicting usage] will enable the statement to parse without error.

Regards, Chuck

Pete Helgren wrote:
I have some SQL code that has been running for ages that suddenly stopped working. It is very curious.

The statement is:

select LISTID FROM AARRLISTH WHERE
USERID = 'PETE' AND DOCTYPE = 'AFREQ' AND CLIENT = 'HKSD'

The error is:
Token = was not valid. Valid tokens: <IDENTIFIER>.

I ran the statement using interactive SQL and the cursor was
positioned at the equal sign just after the column name CLIENT.
When I prompt, I see the column CLIENT listed as "CLIENT".
It has quotes around it.

The curious thing is that this code hasn't been changed for a
couple of years and I never got this error.

So my assumption is:

1. Dumb luck. This never should have worked.
2. CLIENT is now a restricted keyword and it wasn't before (this
first failed on my customers' V5R4M0 box which is WAY behind on
PTF's. It also fails on my V6R1M0 box which is absolutely current.)
3. Someone changed the column name from CLIENT to "CLIENT" (how it occurred on two different boxes would be a mystery though).

Ideas? Why would this suddenly fail ?

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.