Usage Note 39996: "ERROR: An attachment record was truncated" when sending files as email attachments
When sending files as SMTP email attachments from SAS® 9.2 and later, the following error might occur:
ERROR: An attachment record was truncated. The attachment LRECL is too small.
However, increasing the value of LRECL does not prevent the error.
To circumvent, specify the CONTENT_TYPE= (or CT=) option in the FILENAME statement for the attachment as shown in the example below:
filename sendit email from="user@company.com"
to="someone@domain.com"
subject="Excel files from SAS"
attach=("myfile.xls" content_type="application/vnd.ms-excel");
The value for CONTENT_TYPE can be determined by looking at the MIME type of the file. For example, some common file extensions with content_type values are:
*.html text/html
*.pdf application/pdf
*.rtf application/rtf
*.xls application/vnd.ms-excel
Operating System and Release Information
SAS System | Base SAS | Solaris for x64 | 9.21 | | 9.2 TS2M0 | |
Linux for x64 | 9.21 | | 9.2 TS2M0 | |
OpenVMS on HP Integrity | 9.21 | | 9.2 TS2M0 | |
HP-UX IPF | 9.21 | | 9.2 TS2M0 | |
Linux | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.21 | | 9.2 TS2M0 | |
SAS System | N/A | z/OS | | | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | | | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | | | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | | | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | | | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | | | 9.2 TS1M0 | |
Microsoft Windows XP Professional | | | 9.2 TS1M0 | |
Windows Vista | | | 9.2 TS1M0 | |
Windows Vista for x64 | | | 9.2 TS1M0 | |
64-bit Enabled AIX | | | 9.2 TS1M0 | |
64-bit Enabled HP-UX | | | 9.2 TS1M0 | |
64-bit Enabled Solaris | | | 9.2 TS1M0 | |
HP-UX IPF | | | 9.2 TS1M0 | |
Linux | | | 9.2 TS1M0 | |
Linux for x64 | | | 9.2 TS1M0 | |
OpenVMS on HP Integrity | | | 9.2 TS1M0 | |
Solaris for x64 | | | 9.2 TS1M0 | |
*
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.
Beginning with SAS 9.2, when you attempt to send files as email attachments, you might receive errors that an attachment record was truncated and the LRECL is too small.
Date Modified: | 2014-07-25 17:21:20 |
Date Created: | 2010-06-15 09:46:41 |