Problem Note 33744: An incorrect buffer break occurs when calling a macro from an EXECUTE statement that specifies a parameter with an "at" sign (@) in the parameter name
An incorrect buffer break occurs in the following situations:
- You call a macro from an EXECUTE statement that calls an SQL Server 2005 stored procedure.
- The stored procedure contains many parameters with @ in the parameter names (in the form @parameter-name).
This naming convention can cause the macro to be parsed with a break between @ and the parameter name, resulting in an error.
The following code is an example of code that can produce the error:
proc sql;
connect to odbc as mydb (noprompt="dsn=mydsn;");
execute (sys.sp_addextendedproperty
@name = N'Caption',
@value = N%str(%')&vlab.%str(%'),
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N%str(%')encounter_fy&fy._&ds.%str(%'),
@level2type = N'COLUMN',
@level2name = N%str(%')&vname.%str(%')
)
by mydb
;
quit;
The error that is generated is as follows:
ERROR: CLI execute error: [Microsoft][ODBC SQL Server Driver][SQL Server]Must
declare the scalar variable "@"
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to ODBC | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft® Windows® for x64 | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Windows Vista | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Linux | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Solaris for x64 | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.2 TS2M3 |
*
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.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2010-01-12 11:20:26 |
Date Created: | 2008-10-22 15:08:00 |