Problem Note 19330: Problems might occur when you invoke SAS® macros using Microsoft Object Linking and Embedding (OLE) automation submit method
You might encounter problems when you use the OLE automation interface to build, include,
or invoke SAS macros from Visual Basic. The problems occur because Visual Basic uses double
quotation marks (“ ”) when passing its character strings. If you submit macro invocations directly, your code might fail because of the quotation marks. The exact nature of the failure is unpredictable, but symptoms might include warning messages about quoted strings in the SAS log. You might be able to avoid these problems by invoking macros indirectly.
In the following example, you have a SAS source file C:\temp\test.sas that contains the
following program:
%macro m;
filename out "out";
%put DONE;
%mend m;
You also have the following partial Visual Basic program:
OleSAS.Submit("%inc 'C:\temp\test.sas';")
OleSAS.Submit("%m;")
In this situation, you might see the following output in your SAS log:
1 %include 'C:\temp\test.sas';
NOTE 49-169: The meaning of an identifier after a quoted string may
change in a future SAS release. Inserting white space
between a quoted string and the succeeding identifier is
recommended.
DONE
6 filename out
This note indicates that the FILENAME statement is incomplete. The note is generated by the
direct macro invocation (“%m;”) because of problems with the double quotation marks in the
submit method and the double quotation marks in the expanded macro.
WARNING 32-169: The quoted string currently being processed has
become more than 262 characters long.
You may have unbalanced quotation marks.
For this example, you can avoid the problem by using the following
two statements in place of the direct macro invocation in the previously shown OLESAS.Submit statements:
OleSAS.Submit("%let m=%nrstr(%m);")
OleSAS.Submit("&m;")
This problem is projected to be fixed in a future release of SAS.
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8.2 TS2M0 | |
| Microsoft Windows XP Professional | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows Server 2003 Enterprise Edition | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows Server 2003 Standard Edition | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows 95/98 | 8.2 TS2M0 | |
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |
| Microsoft Windows 2000 Server | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows Server 2003 Datacenter Edition | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | 9.2 TS2M0 |
| Microsoft Windows 2000 Professional | 8.2 TS2M0 | 9.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.
| Type: | Problem Note |
| Priority: | low |
| Date Modified: | 2008-06-12 15:55:28 |
| Date Created: | 2007-01-12 12:35:36 |