SUPPORT / SAMPLES & SAS NOTES
 

Support

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

DetailsHotfixAboutRate It

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

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