Usage Note 6312: CLI prepare error using NEON ODBC Driver to access DB2 on MVS with
Access to ODBC on Windows
When using SAS 8.2 with SAS/Access Interface to ODBC and the NEON
32-bit ODBC Driver to access DB2 on MVS you may receive the following
error:
ERROR: CLI prepare error: [NEON][SCOD32.DLL][DB2]DSNT408I SQLCODE=-637,
ERROR: DUPLICATE FOR KEYWORD SQL statement: SELECT * FROM tablename FOR
READ ONLY .
SAS 8.0 and 8.1 SQL did not contain the "FOR UPDATE ..." or "FOR FETCH
ONLY" or "FOR READ ONLY" clause, which was a bug because it should have
been added. In SAS 8.2, we corrected this and added the "FOR READ ONLY".
When "FOR UPDATE ONLY" or "FOR FETCH ONLY" or "FOR READ ONLY" clause is
missing, you create an ambiguous cursor that the DBMS doesn't know how
to handle.
Most servers are bright enough to realize ambiguous means do whatever is
most efficient - MVS decides to be optimistic and assumes you want to do
updates and SAS can not rely on the ODBC Driver to add this, so in order
to be efficient, SAS adds the clause and we expect the driver not to
create invalid SQL.
A Technical Support hot fix for Release 8.2 TSLEVEL TS2M0 for this
issue is available at:
http://www.sas.com/techsup/download/hotfix/82_sbcs_prod_list.html#006312
After applying the hotfix an OS environment variable,
ODBC_DB2_READONLY=OFF, will need to be created. This will causes the
READ ONLY clause to be dropped.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to ODBC | Microsoft Windows 95/98 | 8.2 TS2M0 | |
| Microsoft Windows 2000 Professional | 8.2 TS2M0 | |
| Microsoft Windows NT Workstation | 8.2 TS2M0 | |
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Date Modified: | 2003-12-01 11:31:34 |
| Date Created: | 2001-11-16 12:35:20 |