SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Accessing a Windows server Excel file from a Unix SAS session

Reply
Contributor
Posts: 22

Accessing a Windows server Excel file from a Unix SAS session

Scenario:

Have an excel file on a shared LAN drive (Novell) that serves as a datasource. SAS is running on a Unix server. How do I access the Excel file from Unix?? This needs to be run in a non-interactive (batch) fashion.

I'm sure there are probably other details that I am leaving out, so don't hesitate to ask.

Thanks in advance.

r
SAS Super FREQ
Posts: 8,820

Re: Accessing a Windows server Excel file from a Unix SAS session

Hi:
The documentation contains several examples.
http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/viewer.htm#/documentation/cdl...

If you are using SAS/Access to PCFiles and the SAS Libname Engine for Excel, then you will probably need to provide, at minimum, the SERVER= and PATH= option on the LIBNAME statement, as shown here (from the doc):
[pre]
LIBNAME myxls PCFILES SERVER=D2323 PATH='c:\demo.xls';
[/pre]

cynthia
Contributor
Posts: 22

Re: Accessing a Windows server Excel file from a Unix SAS session

Cynthia, thanks for the info. We've got SAS/ACCESS for PC File formats on our Unix license, but I'm confused about where I get the PC File Server (service) up and running. Do I just pick a PC on the network, since the source file is on a LAN drive? I think that solution still falls short for us since I computers are routinely rebooted after update pushes (and I assume the service would not be restarted until I log-in on that PC??).
SAS Super FREQ
Posts: 8,820

Re: Accessing a Windows server Excel file from a Unix SAS session

Sorry for the confusion...as this Tech Support note explains:
http://support.sas.com/kb/16/812.html

You can use PROC IMPORT and PROC EXPORT without needing the PC File Server OR you can use the PC File Server with the Libname Engine.

For a discussion of log on issues when you DO use the PC File Server, see this Tech Support note:
http://support.sas.com/kb/35/064.html

This paper contains an overall introduction to accessing PC Files from Unix:
http://www2.sas.com/proceedings/sugi28/156-28.pdf

Since the method you use will be version-specific and specific to whether you use the PC File Server or not, you might want to open a track with Tech Support on this issue. To open a track with Tech Support, go to: http://support.sas.com/ctx/supportform/createForm

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 214 views
  • 0 likes
  • 2 in conversation