Usage Note 58472: Socket errors occur when you use the SAS® PC Files Server to export to Microsoft Excel
When you export numerous worksheets using the ExcelCS engine, you might receive the following error:
ERROR: A socket routine returned error: The connection was reset by a peer
ERROR: Error allocating CLI environment.
ERROR: Error in the LIBNAME statement.
Connection Failed. See log for details
Here is a sample program that replicates the error, depending on the machine used. The error does not occur on all machines.
%macro test (num) ;
%do i = 1 %to &num ;
proc export
data=sashelp.prdsale
outfile="c:\temp\fiddled.xlsx"
dbms=excelcs replace;
sheet="Sheet&i";
server=myserver;
port=9621 ;
run;
%end ;
%mend ;
%test(500)
The problem occurs in various points of the loop, depending on the PC resources and the hard-drive configuration.
To circumvent the problem, do one of the following:
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8 Enterprise 32-bit | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8 Enterprise x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8 Pro 32-bit | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8 Pro x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8.1 Enterprise x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8.1 Pro 32-bit | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 8.1 Pro x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows 10 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2008 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2008 R2 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2008 for x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2012 Datacenter | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2012 R2 Datacenter | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2012 R2 Std | 9.4_M2 | | 9.4 TS1M2 | |
| Microsoft Windows Server 2012 Std | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Enterprise 32 bit | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Enterprise x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Home Premium 32 bit | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Home Premium x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Professional 32 bit | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Professional x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Ultimate 32 bit | 9.4_M2 | | 9.4 TS1M2 | |
| Windows 7 Ultimate x64 | 9.4_M2 | | 9.4 TS1M2 | |
| 64-bit Enabled AIX | 9.4_M2 | | 9.4 TS1M2 | |
| 64-bit Enabled Solaris | 9.4_M2 | | 9.4 TS1M2 | |
| HP-UX IPF | 9.4_M2 | | 9.4 TS1M2 | |
| Linux for x64 | 9.4_M2 | | 9.4 TS1M2 | |
| Solaris for x64 | 9.4_M2 | | 9.4 TS1M2 | |
*
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.
Socket errors might occur when exporting numerous Excel worksheets using the SAS PC Files Server with the ExcelCS engine. The problem occurs because the Access Connectivity Engine does not have time to disconnect the connection-specific thread.
| Date Modified: | 2016-08-04 14:39:58 |
| Date Created: | 2016-06-22 12:19:23 |