🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-07-2020 05:40 PM
(2164 views)
Hi everyone,
My name is Mason. I am a new admin for SAS, We just setup a SAS 9.4 on Linux server, we use unixODBC to connect to DB, the version 2.3.1 comes with RHEL7 didn’t work at all, so we downloaded and built unixODBC 2.3.7 on this server and modify LD_LIBARAY_PATH so sasodb will see it Eathan’s than the old 2.3.1, now we are able to connect to the ODBC data source which is a DB2 on AS/400. However when we started to run query, it won’t work at all. It prompted “token invalid”, but the SQL statement we entered was very simple and proved to be running well through query tool.
ERROR: CLI prepare error: [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0104 - Token was not valid. Valid tokens: ( CL END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER BEGIN. : [IBM][System i Access ODBC Driver][DB2 for i5/OS]PWS0005 - Error
occurred in the database host server code.
SQL statement: SELECT * FROM TEST.QSRVSRC.
I checked with IBM support and we turned on ODBC trace to see what was fed to ODBC, it is strange that ODBC got a different meaningless string as SQL statement, which is for sure won’t be able to go through. Below is in ODBC trace log
ODBC][18654][1596812654.551234][SQLPrepareW.c][165]
Entry:
Statement = 0x7fea00000e60
SQL = [SLC RMUI00.N_PCNTSQFRRA NY][length = 54]
[ODBC][18654][1596812654.571800][SQLPrepareW.c][346]
Exit:[SQL_ERROR]
DIAG [42000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0104 - Token was not valid. Valid tokens: ( CL END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER BEGIN.
DIAG [HY000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]PWS0005 - Error occurred in the database host server code.
The SAS on PC(MS Windows) are working with the same DB (also through ODBC) without any problem.
Is there anything that can be configured wrong to cause this kind of issue? Any help is highly appreciated.
My name is Mason. I am a new admin for SAS, We just setup a SAS 9.4 on Linux server, we use unixODBC to connect to DB, the version 2.3.1 comes with RHEL7 didn’t work at all, so we downloaded and built unixODBC 2.3.7 on this server and modify LD_LIBARAY_PATH so sasodb will see it Eathan’s than the old 2.3.1, now we are able to connect to the ODBC data source which is a DB2 on AS/400. However when we started to run query, it won’t work at all. It prompted “token invalid”, but the SQL statement we entered was very simple and proved to be running well through query tool.
ERROR: CLI prepare error: [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0104 - Token was not valid. Valid tokens: ( CL END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER BEGIN. : [IBM][System i Access ODBC Driver][DB2 for i5/OS]PWS0005 - Error
occurred in the database host server code.
SQL statement: SELECT * FROM TEST.QSRVSRC.
I checked with IBM support and we turned on ODBC trace to see what was fed to ODBC, it is strange that ODBC got a different meaningless string as SQL statement, which is for sure won’t be able to go through. Below is in ODBC trace log
ODBC][18654][1596812654.551234][SQLPrepareW.c][165]
Entry:
Statement = 0x7fea00000e60
SQL = [SLC RMUI00.N_PCNTSQFRRA NY][length = 54]
[ODBC][18654][1596812654.571800][SQLPrepareW.c][346]
Exit:[SQL_ERROR]
DIAG [42000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0104 - Token was not valid. Valid tokens: ( CL END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER BEGIN.
DIAG [HY000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]PWS0005 - Error occurred in the database host server code.
The SAS on PC(MS Windows) are working with the same DB (also through ODBC) without any problem.
Is there anything that can be configured wrong to cause this kind of issue? Any help is highly appreciated.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
finally it seems to be encoding compatibility problem, the installation points !SASROOT/sas to bin/sas_u8, when we use bin/sas_en instead then there is no problem at all.
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You would be best to open a track with SAS Tech Support if you haven't already as your setup isn't common.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks SASKiwi. We did open a case to SAS tech support. Just wan to see if there is anyone has similar experience....
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Great. Unfortunately ODBC setup on Unix is way different than on Windows and always seems to be harder to troubleshoot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
finally it seems to be encoding compatibility problem, the installation points !SASROOT/sas to bin/sas_u8, when we use bin/sas_en instead then there is no problem at all.