Chapter Contents

Previous

Next
SAS/SHARE User's Guide

Syntax

LIBNAME libref < 'SAS-data-library'> SERVER=serverid <ACCESS=READONLY> <OUTREP= format> <USER=userid> <PASSWORD=password > <SAPW=server-access-password> <SLIBREF=server-libref> <engine-options>;

libref
is any valid SAS name that refers to the server library to be accessed. The libref must be the first argument in the LIBNAME statement.

In a SAS program, after you specify a library name in the LIBNAME statement, you refer to the libref in the following form:

data;
   set libref.SAS-data-set;
run;

If you omit the physical name of the data library in your LIBNAME statement and you do not specify the engine/host SLIBREF= option, the libref that you specify is presumed to be the server libref for an existing server library. Information about the SLIBREF= option appears later in this chapter.

'SAS-data-library'
must be a valid physical name for the SAS data library that you want to access. The name must be enclosed in single or double quotes.

The physical name that you specify is used by the server session and not the client session. If you omit the physical name, you can access the library by the libref argument or by the SLIBREF= engine/host option. Information about the SLIBREF= option appears later in this chapter.

For examples of host-specific library-naming conventions, see Specifying a Host-Specific SAS Data Library.

SERVER=serverid
specifies a name for the server. The server name must meet the criteria for a valid SAS name, although it can also include the following special characters: dollar sign ($), at sign (@), and pound sign (#).

Server naming is also constrained by the host type and the access method that you specify for communication between a server and a client session. Consult the server administrator for the value of serverid.

For complete access method and server-naming details, see Communications Access Methods for SAS/CONNECT and SAS/SHARE Software.

ACCESS=READONLY
controls a user's read access to a data library, in this case, through a SAS/SHARE server. If you specify this option, you are able to read but not update data in the library. Other users may have read/write access to the library while it is accessed through the server.

For more information about this option, see the LIBNAME statement in SAS Language Reference: Dictionary.

Note:   Specifying the SERVER= option is not required when using the ACCESS= option.  [cautionend]

OUTREP=format
The OUTREP option allows you to create new files in a foreign host format. This is useful when the readers of a file will be using a different CPU than the creator of the file.

A data set is always converted to the native server format before writing to disk or reading for a client. Therefore, attempting to convert a data set on the server to a client's format could cause extra translations and slower performance. The data could also suffer a loss of precision because of the extra translations. For these reasons, the use of OUTREP= is not generally recommended with SAS/SHARE.

The valid format values for OUTREP in Version 7 and later releases are:

¹ Support for these values was introduced in Version 8.

USER=username | _PROMPT_
specifies the userid of the accessing client on the server. The host on which the client runs can also affect username conventions. For details about username conventions imposed by the host, see Communications Access Methods for SAS/CONNECT and SAS/SHARE Software.

Nicknames for USER are USERNAME, USERID, and UID.

Valid values that can be assigned to USER are:

username
For details about a valid username, see Username and Password Naming Conventions.

_PROMPT_
a secure method, specifies that SAS prompt the user for a valid username.

PASSWORD=password | _PROMPT_
specifies the password of the accessing client on the server. The host on which the client runs can also affect password naming conventions. For details about password naming conventions imposed by the host, see Communications Access Methods for SAS/CONNECT and SAS/SHARE Software.

Nicknames for PASSWORD are PASSWD, PASS, PWD, and PW.

Valid values for PASSWORD are:

password
For details about a valid password, see Username and Password Naming Conventions.

_PROMPT_
a secure method, specifies that SAS prompt the user for a valid password.

SAPW=password
specifies a server access password, which is used to gain access to a SAS server that is executing with the PROC SERVER UAPW= option in effect. The password argument that you specify for this option is replaced by Xs in the SAS log.

Although this option is specified in the LIBNAME statement, it has nothing to do with the SAS data library being accessed. This option is used to establish communication with the server through which the library can be accessed.

SLIBREF=server-libref
specifies the libref that is used by the server to identify the SAS data library when no physical name is specified and the server libref is different from the client libref.

engine options
The following options characterize the remote engine (either the default BASE engine or an alternative engine) that you specify in the LIBNAME statement.

Note:   You must also specify the SERVER= option when using any of the engine options.  [cautionend]

RENGINE=engine-name
specifies the engine to be used to process the SAS data library in the server's SAS execution. Specify this option only to override the SAS default for a library in the server's execution or to reduce search time while the server determines which engine to use to access a particular SAS library. Ordinarily, this option should not be specified because the server determines which engine to use to process the data library. REMOTE is the name of the default engine for Version 7 and later releases, and REMOTE6 is the name of the default remote engine for Version 6.

RMTVIEW=YES|NO
determines whether SAS data views are interpreted in the server or the client SAS session. SAS data views include DATA step views as well as views created by using the SQL procedure and the ACCESS procedure (in SAS/ACCESS software). The default is YES.

SAS data views are accessed through an engine just as other SAS data sets are. Where a data view is interpreted determines where the view engine is loaded and used. DATA step views use the SASDSV engine, and PROC SQL views use the SQLVIEW engine. SAS Institute creates a product-specific engine for each SAS/ACCESS interface product, which the SAS/ACCESS views use for that interface.

The default value of this option (YES) causes views to be interpreted in the server's SAS execution. When views are interpreted in the server SAS session, the server may require large amounts of processor time and storage, but the amount of data transferred to the client SAS sessions may be reduced. Conversely, disallowing view processing by the server SAS session might increase the amount of data transferred between the server and client SAS sessions but prevents the server from using more than minimal processing time.

If you set the value of this option to NO, SAS data views are interpreted in the client SAS session.

For details about view interpretation, see Interpreting SAS Data Views.

ROPTIONS="option=value<option=value> ..."
specifies options to the remote engine that are used to process the SAS data library in the server SAS session. ROPTIONS may be specified for either the default engine or an alternative engine that is specified with the RENGINE= option. One or more options in the form keyword=value may be specified. You can specify as many options as you need. Use a blank space to separate options. (See the documentation for the specific engine that you will be using for information about remote engine options.) If you use the default engine and you want to specify options with the ROPTIONS= option, it is recommended that you also specify the RENGINE= option for clarity.

The LIBNAME statement also takes the arguments LIST and CLEAR. See SAS Language Reference: Dictionary for more information.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.