SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 33451: An error occurs when you run a DB2 stored procedure that has a question mark for a parameter value in SAS/ACCESS® Interface to DB2

DetailsHotfixAboutRate It

The following error occurs when you attempt to run a DB2 stored procedure in SAS/ACCESS® Interface to DB2:

ERROR: CLI execute error: [IBM][CLI Driver] CLI0100E  Wrong
number of parameters. SQLSTATE=07001

The error occurs when you submit an SQL procedure, such as the following, that contains a question mark as a parameter value:

proc sql; connect to db2 (db=DBD1 user=user-name password=password); execute ( call OY.YMPGFM00 ('CHUCK','G','00',?)) by db2 ; disconnect from db2 ; quit;

The procedure works without error when it is executed with the DB2 Command Line Processor.

To circumvent this problem, do one of the following:

  • Use literal values instead of question marks for your parameters.
  • Create a new stored procedure that calls the stored procedure containing the question-mark parameter value. Then call the new stored procedure from SAS.

Click the Hot Fix tab in this note to access the hot fix for this issue.

Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to DB2Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP4
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP4
Microsoft® Windows® for x649.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP4
Linux9.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP4
* 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.