BookmarkSubscribeRSS Feed
sudharsanan
Calcite | Level 5

Hi,

Is there is any way to get the name of the server which is already signed on in SAS/Base?

is the details like this about signed on server is stored in any SASHELP dataset or macro variables?

Thanks in advance!

-Sudharsanan

4 REPLIES 4
jakarman
Barite | Level 11

Please explain what you are really looking for. This is looking a duplicate of: https://communities.sas.com/thread/58003

Eguide SP Base all have some information. But If your goal is logging then there logging chapters   

---->-- ja karman --<-----
sudharsanan
Calcite | Level 5

@Jaap Karman Thanks for your reply. The mentioned thread is created by me.

I want to copy a table from work library of remote server to local PC SAS library for processing with it.

But constrain is I won't be knowing the name of the server which user has remote signed on.

So I could not create library reference to the remote server. As the syntax of such libname statement requires servername as below.

 

libname rwork server=&servname slibref=work;

I could not use proc download as its very slow and also pops up a downloading dialog window while running it.

So it would be better if I get the server name somehow for using in the libname statement to create library reference.

Hope I have clearly explained.Smiley Happy

Thanks!

-Sudharsanan

Amir
PROC Star

Hi,

Is the following of any help?

SAS(R) 9.4 Macro Language: Reference

Regards,

Amir.

jakarman
Barite | Level 11

sudharsanam, That explains a lot.  

The servername you are referring is not one like the hostname of the machine it is a logical SAS name the user has to give when doing the connection.

It has the same naming conventions as the libname statement.


With async processing you can have a lot them all running at the same moment. Could become as stressing situation for one taking care of the server.

In that case it would make much sense to have you sas-admin a global defined table in the sasautos / autoexec.

As long you are working with the last connected session you have sas macro-variable containing that session name.

It is easy to find with %put _all_ ;  (do not remember the exact name could be comething like remoteid)
It is the same approach as some connect statements not needing the servername as long it is the last session.

As you are telling proc download is slow, you have more troubles to solve as that one should be fast. It can only be slow by bad network or not optimized SAS settings (small buffers being resized). The remote libname is easy to show the remote structure, to combine some data. The datatransfer rate is the same or lower as proc download.   

---->-- ja karman --<-----

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
  • 4 replies
  • 1144 views
  • 0 likes
  • 3 in conversation