BookmarkSubscribeRSS Feed
Mark_WGU
Calcite | Level 5
I need to use a dataset that resides on our primary SAS server, a Unix box, in a SAS program running on a local PC.
14 REPLIES 14
SASPhile
Quartz | Level 8
Use remote login.
SASPhile
Quartz | Level 8
I mean rsubmit.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
If it is an "external" file (not a SAS file), use the FILENAME statement, presuming you have READ-access. Or if it is a SAS file / database, use the LIBNAME statement. Then in your SAS DATA / PROC step, you would refer to either the or , depending on the file / data type.

Suggest reviewing the SAS Language Dictionary on FILENAME / LIBNAME statements, and also refer to the SAS "companion" guide for your OS. These documents are accessible from the SAS.COM Support website.

Scott Barry
SBBWorks, Inc.
Mark_WGU
Calcite | Level 5
It is a SAS data set, The libname docs don't mention a server connection, and refer me to the libname docs for my OS. Which OS, the one I am on, or the one I want to connect to? I haven't been able to find either.
Patrick
Opal | Level 21
Hi

If you have SAS/Connect licensed at your site (needed to connect your local SAS Server with the remote UNIX SAS Server) then you'll find the docu necessary in the SAS/Connect Users Guide.

The example sections might already give you all information you need - either Remote Library Services, or Data Transfer Services.

HTH
Patrick
Daryl
SAS Employee
The best option would be SAS/CONNECT. You would need it licensed both on UNIX and on your PC.

If you don't have it licensed in both places, you could make a local copy of the dataset on your PC. But FTP alone won't be enough. SAS data sets are not compatible across operating systems. You will need to convert the data set for use on a PC using PROC CPORT.
Mark_WGU
Calcite | Level 5
Thanks, but no cigar yet. We have SAS/Connect on both systems, and I have worked through the entire manual. I don't know enough to know which of the little detail settings I need to tweak. I just need a big picture. Right now I have been working with:
%let remhost = sascompute.wgu.edu;

options comamid=tcp remote=sascompute;

libname lhost 'c:\SAS Data';

/*************************************/
/* sign on and download data set */
/*************************************/

signon;

rsubmit;

libname rhost '/sasdata';

But can't even get the signon to work. It looks like there is a connection between session ID and server name, but I can't find how to associate them.
Daryl
SAS Employee
Hi Mark,
Can you post your SAS log showing connection errors?
kind regards,
Daryl
advoss
Quartz | Level 8
You'll need a connect script to do the actual logon to your UNIX system and then start SAS.
Mark_WGU
Calcite | Level 5
Here is the log:

1 %let wrds = sascompute.wgu.edu.edu 23;
2 options comamid=TCP remote=wrds;
3
4 signon username=wgusas password = XXXXXXXX;
NOTE: Remote signon to WRDS commencing (SAS Release 9.02.02M2P090109).
ERROR: A communication subsystem partner link setup request failure has occurred.
ERROR: The connection was refused.
ERROR: Remote signon to WRDS canceled.
5
6 options nocenter nodate nonumber ls=max ps=max;
7
8 libname ibeslib remote '/sasdata' server=wrds;
ERROR: Attempt to connect to server WRDS failed.
ERROR: A communication subsystem partner link setup request failure has occurred.
ERROR: Cannot find TCP service 'wrds'.
ERROR: Error in the LIBNAME statement.
9
10 proc contents data=ibeslib.bi_enrollment_summary_fact;
ERROR: Libname IBESLIB is not assigned.
11 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.43 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.
12
13 signoff;
NOTE: A link to WRDS does not exist. SIGNOFF is not necessary.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Have you considered contacting your SAS software administrator -- more than likely you're not the first individual making such an attempt for your site. Do consider that it's likely your onsite tech staff (or peer-users) are most informed about how SAS may be configured and what's needed to function correctly.

Scott Barry
SBBWorks, Inc.
Ksharp
Super User
Hi.
Is there FTP service in your primary SAS server.
If it has ,you can use ftp command.
Start-> run -> command-> ftp 10.1.2.1->binary 80 -> get test.sas7bdat


Ksharp
Doc_Duke
Rhodochrosite | Level 12
You could use a "samba" connection from the unix server (it surfaces the unix files to the windows side). That requires the Unix admin to do some setup.
Peter_C
Rhodochrosite | Level 12
Mark

SAS/Connect provides procs upload and download.
They support external files (i.e other than sas file types like data sets and catalogs) with the infile= and outfile= options.
Depending on the complexity of the file you want to transfer upi might alse want te BINARY option.

Good luck
peterC

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 14 replies
  • 2063 views
  • 0 likes
  • 9 in conversation