To access a SAS library
or an external DBMS through a
SAS/SHARE server, you must use the REMOTE engine to define a
libref for the library. In a LIBNAME statement, specify the libref,
which identifies the library or the DBMS, and the
SAS/SHARE server that you'll use to access
that library or DBMS.
In the following example,
the engine name REMOTE, which is usually specified between the libref
and the pathname, is omitted because it is implied by the SERVER=
option.
libname invoice '/dept/acct/data/invoice' server=share1;
If the library is predefined
to the server by a server administrator, you can omit the pathname
and use only the libref, which is defined for the library in the server
SAS session, to identify the library. Omitting the pathname protects
your application if the pathname for the library has changed.
In the following example,
the REMOTE engine and the server assume that the libref (invdata),
which you defined for your SAS session, is the same libref that is
defined by the server administrator in the server SAS session.
libname invdata server=share1;
If the library is predefined
to the server but you want to define a libref that is different from
the one that is defined in the server SAS session, use the SLIBREF=
option in the LIBNAME statement to specify a newly defined server
libref, as shown in the following example. However, if a server runs
with the option NOALLOC in effect, all libraries that are accessed
through that server must be predefined by the server administrator.
libname invoice server=share1 slibref=invdata;