LIBNAME Statement Syntax

Associates a SAS libref with data to be processed by SAS Federation Server.

Valid in: Anywhere
Restriction: The FEDSVR LIBNAME engine requires SAS Federation Server 3.2 or later.
Interactions: The FEDSVR LIBNAME engine supports accessing only one data source at a time. For more information, see Federated DSNs.
The engine processes nonexistent values as SAS missing values rather than ANSI SQL null values. For behavior differences, see Null Values.

Syntax

Arguments

The LIBNAME statement takes the following arguments:

libref

a valid SAS name that serves as an alias (shortcut) to the aggregate storage location of the data source or data sources. The data sources can be SAS data sets or third-party relational databases. A libref cannot exceed eight characters.

FEDSVR

the engine name that connects to SAS Federation Server data access services that provide scalable, threaded, high-performance, and standards-based data access technology. The engine establishes a remote connection, such that the current SAS session is a client to SAS Federation Server.

Requirement The engine name is required.

server-connection-options

provide connection information to SAS Federation Server. For a list of server connection options, see Server Connection Options.

data-source-connection-options

provide connection information for accessing the data source or data sources. For the data source connection options, see Data Source Connection Options.

Requirement You must specify data source connection information.

data-source-processing-options

define how data sources are processed. For a list of available options, see Data Source Processing LIBNAME Statement Options for the FEDSVR Engine.

CLEAR

disassociates one or more currently assigned librefs. Specify libref to disassociate a single libref. Specify _ALL_ CLEAR to disassociate all currently assigned librefs.

LIST

writes the attributes of one or more libraries to the SAS log. Specify libref to list the attributes of a single library. Specify _ALL_ LIST to list the attributes of all libraries that have librefs in your current SAS session.

Server Connection Options

The server connection options specify how to connect to SAS Federation Server.

AUTHDOMAIN=authentication-domain

specifies the name of an authentication domain, which is a metadata object that manages the credentials (user ID and password) that are associated with the specified domain. Specifying an authentication domain is a convenient way to obtain the metadata-based user credentials rather than having to explicitly supply them during server sign-on. An example is AUTHDOMAIN=FedServerAuth.

A SAS metadata administrator creates authentication domain definitions while creating a user definition with the User Manager in SAS Management Console. The authentication domain is associated with one or more login metadata objects that provide access to SAS Federation Server. The domain name is resolved by the engine calling the metadata server and returning the authentication credentials.
Requirements The authentication domain and the associated login definition must be stored in a SAS Metadata Repository, and SAS Metadata Server must be running to resolve the metadata object specification.
Enclose domain names that are not valid SAS names in double or single quotation marks.
Interaction If you specify AUTHDOMAIN=, do not specify USER= and PASSWORD=.
See For more information about creating and using authentication domains, see SAS Intelligence Platform: Security Administration Guide.

PASSWORD=password

specifies the password that corresponds to the user ID for SAS Federation Server. The maximum length is 512 characters.

Alias PWD=
Interaction If the password is not specified and you are running SAS interactively, SAS displays a dialog box to acquire the password for the session.
Tip To specify an encoded password, use the PWENCODE procedure to disguise the text string, and then enter the encoded password for PASSWORD=. See the PWENCODE procedure in Base SAS Procedures Guide.

PORT=number

specifies the TCP port that SAS Federation Server is listening to for connections. The default port number used in SAS Federation Server installations is 2171. The connection uses the SAS Bridge protocol. An example is port=2171.

Range 0 - 65535

SERVER='hostname | IPaddress'

specifies either the host name or IP (Internet Protocol) address of the computer that hosts SAS Federation Server. Here is an example: server="d1234.us.company.com" or server="123.45.67.890". The maximum length is 256 characters.

Requirements You must specify the computer that hosts SAS Federation Server, and you must enclose the host name or IP address in single or double quotation marks.
SAS Federation Server must be running.
You must also specify DSN=.
Interactions Specifying SERVER= invokes the FEDSVR driver. The driver acts as a conduit between a client, which is the current SAS session, and a data source that is associated with SAS Federation Server.
The FEDSVR driver is platform independent, which means that it can communicate from a SAS session on any platform with SAS Federation Server on any platform.

USER=ID

specifies the user ID for logging on to SAS Federation Server. The maximum length is 256 characters.

Alias UID=
Requirement The user ID must be capable of authenticating to SAS Metadata Server. Users are registered on SAS Metadata Server by a SAS Federation Server administrator.
Interaction If the user ID is not specified and you are running SAS interactively, SAS displays a dialog box to acquire the user ID for the session.

Data Source Connection Options

The data source connection options provide the connection information to access the data source. To access the data, you reference a DSN, which is the name of an object that encapsulates the information that is needed to connect to the data source. The DSN contains the table driver name, the physical location of the data, as well as any necessary authentication information that is required to retrieve data.
The data source connection arguments to reference a DSN are as follows:

DSN=dsn-definition

references a DSN, which encapsulates all of the information that is necessary to connect to a particular data source, configures the authorization that is enforced for data access, and identifies the SQL dialect that the application submits to the data source.

Requirements A SAS Federation Server administrator must have created the DSN definition.
If the DSN definition name is not a valid SAS name, enclose the DSN definition name in quotation marks. If the name contains single quotation marks, use double quotation marks around the name. Otherwise, use two single quotation marks in the name and enclose the name in single quotation marks.
If a user ID and password are defined for the DSN definition, you must specify DSNUSER= and DSNPASSWORD= with the DSN= definition name. SAS data sets do not support a user ID or password for a DSN definition.
To resolve the DSN, the user ID specified in DSNUSER= must have Connect privilege to the DSN definition, the data service that it references, or to SAS Federation Server. For more information, see SAS Federation Server: Administrator’s Guide.

DSNPASSWORD="password"

specifies the password that corresponds to the user ID for the DSN. The maximum length is data source dependent.

Alias DSNPWD=
Requirements The password must be enclosed in double quotation marks.
To specify DSNPASSWORD=, you must specify DSN= and DSNUSER=.
Tip You can use an encoded password in place of a plain-text password. For a method to encode your password, see the PWENCODE procedure in Base SAS Procedures Guide.

DSNUSER="ID"

enables you to access a DSN with a user ID that is different from the default ID.

Alias DSNUID=
Default If DSNUSER= is not specified, the current user is assumed.
Requirements To specify DSNUSER=, you must specify DSN= and DSNPASSWORD=.
The user ID must be enclosed in double quotation marks.

Data Source Processing Options

The LIBNAME statement data source processing options control how a data source is processed. For a list of the statement options, see Data Source Processing LIBNAME Statement Options for the FEDSVR Engine.