Problem Note 45208: Prompt values that contain quotation marks might cause an error in SAS® Enterprise Guide® 4.2 or later
Code similar to the following might run in SAS Enterprise Guide 4.1 without error:
data table_name;
x='def';
run;
%Macro test (var1=);
Proc sql;
Select *
From table_name
Where x in &var1;
Quit;
%Mend test;
%test (var1=&var1)
|
However, the same code might generate errors similar to the following when run in SAS Enterprise Guide 4.2 and later.
ERROR 386-185: Expecting an arithmetic expression.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric
constant, a datetime constant, a missing value, (, -, SELECT.
ERROR 200-322: The symbol is not recognized and will be ignored.
To circumvent the problem, use %UNQUOTE on the prompt variable, as shown in the following example:
data table_name;
x='def';
run;
%Macro test (var1=);
Proc sql;
Select *
From table_name
Where x in &var1;
Quit;
%Mend test;
%test (var1=%unquote(&var1))
|
Operating System and Release Information
SAS System | SAS Enterprise Guide | Microsoft® Windows® for x64 | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Enterprise Edition | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows Server 2003 Standard Edition | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows Server 2003 for x64 | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows Server 2008 | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows Server 2008 for x64 | 4.3 | | 9.2 TS2M3 | |
Microsoft Windows XP Professional | 4.3 | | 9.2 TS2M3 | |
Windows 7 Enterprise 32 bit | 4.3 | | 9.2 TS2M3 | |
Windows 7 Enterprise x64 | 4.3 | | 9.2 TS2M3 | |
Windows 7 Home Premium 32 bit | 4.3 | | 9.2 TS2M3 | |
Windows 7 Home Premium x64 | 4.3 | | 9.2 TS2M3 | |
Windows 7 Professional 32 bit | 4.3 | | 9.2 TS2M3 | |
Windows 7 Professional x64 | 4.3 | | 9.2 TS2M3 | |
Windows 7 Ultimate 32 bit | 4.3 | | 9.2 TS2M3 | |
Windows 7 Ultimate x64 | 4.3 | | 9.2 TS2M3 | |
Windows Vista | 4.3 | | 9.2 TS2M3 | |
Windows Vista for x64 | 4.3 | | 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: | high |
Date Modified: | 2012-01-03 10:19:41 |
Date Created: | 2011-12-21 16:38:10 |