Problem Note 11120: Invalid value for !EM_ATTACH option when sending multiple attachments in
SAS 9
When you attempt to send multiple attachments using a DATA step to send
email in SAS 9, the following error message might appear:
Invalid value for !EM_ATTACH.
The problem occurs when the attachments are specified
as variable names as shown below:
attach1="'c:\testsas\file1.txt'";
attach2="'c:\testsas\file2.txt'";
put '!EM_ATTACH!' "(" attach1 " , " attach2 ")";
To circumvent the problem, remove the comma and the extra quotes
as follows:
attach1="'c:\testsas\file1.txt'";
attach2="'c:\testsas\file2.txt'";
put '!EM_ATTACH!' "(" attach1 attach2 ")";
If you need to specify the comma, you can specify it as needed:
put '!EM_ATTACH! ("c:\testsas\file1.txt" "c:\testsas\file2.txt")';
You can also specify these using macro variables:
%let attach1=%str("'c:\testsas\file1.txt'");
%let attach2=%str("'c:\testsas\file2.txt'");
put '!EM_ATTACH!' "("&attach1" , "&attach2")";
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows XP Professional | 9 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
| Microsoft Windows 2000 Professional | 9 TS M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
| Microsoft Windows NT Workstation | 9 TS M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
| Microsoft Windows 2000 Server | 9 TS M0 | |
*
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 |
| Topic: | Third Party ==> Information Exchange ==> E-mail (SMTP)
|
| Date Modified: | 2003-11-10 14:17:12 |
| Date Created: | 2003-10-22 09:45:58 |