The information in this
section is recommended primarily for server administrators and programmers
who write applications that access shared data.
For complete details
about each macro that you can use to access a server and its libraries,
see SAS/SHARE Macros.
Programs that use
SAS/SHARE must include a LIBNAME
statement that identifies the
SAS/SHARE server through which a specified library will be accessed.
Adding servers and changing server IDs can require users and server
administrators to obtain current server ID information each time they
want to access a server. That could make maintaining production or
utility programs difficult.
Although there is no
permanent connection between a SAS library and a specific server,
there is frequently a logical connection. Programmers, server administrators,
and users might always want to access a specific library through
the same server because only one server at a time can provide access
to a library. The same logical connection can also exist between
a group of users and a server. This is an advantage if all the members
of a department needed to use the same server, especially if they
are sharing libraries.
To use
SAS/SHARE most effectively without compromising
performance, administrators often need a dynamic and flexible server
environment. They need to be able to start and stop servers as the
need arises, and to easily redistribute the load on the servers. They
want to be able to switch libraries and users from one server to another
quickly and easily. To balance the needs of both administrators and
users,
SAS/SHARE includes
macros to be defined through the autocall function of the SAS macro
facility.
These
SAS/SHARE macros enable the administrator
to define aliases for a server and to associate an alias with a specific
library. Programs issue these macros to generate the requisite LIBNAME
statements for accessing that library through the server that is associated
with the alias. Then, the administrator can add servers, change server
IDs, and switch libraries and users from one server to another with
a process that is totally transparent to the program or the SAS user.
SAS/SHARE macros can be used to do the following:
-
generate and display the tables
of macro variables that associate libraries with server aliases and
server aliases with server IDs
-
generate part or all of a LIBNAME
statement
-
-
generate PROC OPERATE and SET SERVER
statements
The server ID that is
associated with an alias can be changed during any appropriate server
or application outage (for example, down time). You update only the
file that contains the table of macro variables that maps aliases
to server IDs. Additionally, a library can be logically associated
with a different server by updating the table that associates libraries
with server aliases.
For example, a site
might have four logical servers (that is, four different server aliases)
but only one physical server by having all the aliases map to the
same server ID. Whenever the load on that one server gets too heavy,
the site can start an additional server and shift specific libraries
and users to it by simply pointing one of the aliases to that new
server.