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
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
@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.
Thanks!
-Sudharsanan
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: