05-21-2014 07:11 AM
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!
05-21-2014 07:45 AM
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
05-21-2014 11:43 AM
@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.
05-21-2014 12:46 PM
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.