Hi,
I have a problem via SQL and into RPG too when I type SUBSTR(xxxx,1,6)
from some reason on my iSeries it requesting to be one space between comma and lengths e.g. substr(xxx, 1, 6).
I know that on other iSeries it's not a problem and on more examples it is not written with these spaces...
This is the error message when I check
Select * from ztrans0p
where substr(trcrd#,1,6) = '516971'
Token ,1 was not valid. Valid tokens: ) ,.
Message ID . . . . . . : SQL0104
Message . . . . : Token ,1 was not valid. Valid tokens: ) ,.
Cause . . . . . : A syntax error was detected at token ,1. Token ,1 is not
a valid token. A partial list of valid tokens is ) ,. This list assumes
that the statement is correct up to the token. The error may be earlier in
the statement, but the syntax of the statement appears to be valid up to
this point.
Recovery . . . : Do one or more of the following and try the request again:
-- Verify the SQL statement in the area of the token ,1. Correct the
statement. The error could be a missing comma or quotation mark, it could
be a misspelled word, or it could be related to the order of clauses.
-- If the error token is <END-OF-STATEMENT>, correct the SQL statement
because it does not end with a valid clause.
Do you know where I can check what is wrong with my iSeries?
Thanks in advance,
Nesa