Desktop productivity for business analysts and programmers

Alias name for a server

Reply
Contributor
Posts: 43

Alias name for a server

One of our servers has the letter O:

 

Many of our SAS program are on the Server O as well as some datasets.

 

For some reasons I don't know the peoples from the informatics has rename the Server O as \\intra\office\..

 

Is there a way to use an alias server name in order to continue to use the letter O: in our SAS programs and to make sure that this letter O: refer to the server on: \\intra\office\..

 

Regards,

Alain

Super User
Posts: 11,134

Re: Alias name for a server

I would start by using the Windows tools to "Map network drive" to assign O: to that server if possible.

But the steps will need to be done for each computer that wants to use the setting.

Contributor
Posts: 43

Re: Alias name for a server

Hello Kurt,

 

Do you have more information on UNC.  How do we use this approach in SAS?

Regards,

 

Alain

Super User
Posts: 7,446

Re: Alias name for a server

The UNC can be used like any filename; the operating system resolves the path.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 7,446

Re: Alias name for a server

The UNC notation is the future. Switch to that in your programs.

The drive letters are a leftover from the CPM roots of DOS. 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 3,237

Re: Alias name for a server

You are better off using the UNC approach \\intra\office\ as @KurtBremser has already recommended. Drive mappings like O: need to be maintained across all computers using it whereas a UNC once defined can be used by any user with the right permissions.

Super User
Super User
Posts: 6,845

Re: Alias name for a server

In your example the server name in now INTRA. You used to have a standard mapping of the drive letter O to some disk drive and it appears that is no longer being done for you automatically.  

If you can it would be better to change all of the old programs that used to use O:\somefile to instead use \\intra\office\somefile so that they are no longer dependent on the drive letter mapping.  You could even change the programs to set a macro variable at the top and just reference that macro variable.  Then when they decide to move the office share to another server or even move it a sub-directory of some other share you just need to change the definition of the macro variable.

 

%let topnode=\\intra\office ;
libname mylib = "&topnode/my_project/SAS_data" ;
data mylib.mydata ;
  infile "&topnode/my_project/RAW_data/mydata.csv" dsd ....
Ask a Question
Discussion stats
  • 6 replies
  • 152 views
  • 1 like
  • 5 in conversation