Overview of the SPD Server LIBNAME Statement

The SPD Server LIBNAME statement enables you to establish a connection to a server domain from your SAS session and associate a libref with the connection. A libref is a logical name of your choosing that serves as a library reference. After you define a libref, you can specify the libref with a table name in the SAS DATA step and SAS procedures. This enables you to read, create, and update the table in the referenced domain, if you have appropriate access. The libref and table name are specified in the form libref.tablename. In SPD Server, the LIBNAME statement is also used to change server passwords.

LIBNAME Statement Syntax

The server LIBNAME statement has the following syntax:
libname libref engine 'domain' connection-options 
<user-validation-options> 
<data-processing-options> 
<password-management-options>;

Required Arguments

libref
a shortcut name or a nickname for the location where your SPD Server files are stored. The name can be up to eight characters long and must conform to the rules for SAS names. For more information about SAS names, see SAS Language Reference: Concepts.
You will use the libref as one part of a two-part table name in the form libref.table-name to identify your SPD Server tables in SAS statements.
If you want to use one-part names to reference tables (MyTable ) instead of two-part names, you can assign the libref USER. SPD Server will store tables identified with one-part names (or with two-part names that specify the libref USER) in the domain pointed to by the USER libref. For more information about the USER libref, see “User Library” in “SAS System Libraries” in SAS Language Reference: Concepts.
To be able to create temporary tables in the domain, specify the TEMP= LIBNAME option in the LIBNAME statement. For more information, see TEMP= LIBNAME Statement Option.
engine
the name of the engine that will be used to access SPD Server. The valid value is SASSPDS.
'domain'
the name of a server domain. The domain must have been defined in advance by a server administrator.
connection-options
provide information to connect to SPD Server. To connect to the server, you must specify a server host name and the port number of the SPD Server name server. If your server is using ACL security, you must also authenticate yourself to the server. You have the choice of several arguments for both tasks.
AUTHDOMAIN=
Allows authentication to the server by specifying the name of an authentication domain metadata object. For more information, see AUTHDOMAIN= LIBNAME Statement Option.
Note: If you use AUTHDOMAIN=, do not specify USER= and PASSWORD= or PROMPT=.
HOST=
specifies the network node name or IP address of the server host (for example: nsname or 123.456.763). When you use HOST=, you must specify the name server port number or port name in the SERVICE= argument. For more information, see HOST= LIBNAME Statement Option.
Note: You can use either HOST=, SERVER=, or the %SPDSHOST macro variable to identify the server host to the SAS session. The HOST= argument is preferred when you need to follow FTP conventions.
Tip
Use an IP address with HOST= when your host is multi-homed (contains multiple network cards).
PASSWORD=
specifies the password associated with the specified server user ID. For more information, see PASSWORD= LIBNAME Statement Option.
Note: When native authentication is configured, you must change your password the first time that you use SPD Server. For more information, see Changing Server Passwords.
Note: You can use either PASSWORD= or PROMPT= to supply the password. PROMPT= is considered to be more secure.
Note: If you do use PASSWORD=, we recommend encoding the password with the PWENCODE procedure. You must run the PWENCODE procedure in SAS. See the Base SAS documentation for more information about the PWENCODE procedure.
PROMPT=YES | NO
Specifies whether to prompt the server user for a password. The default value is NO. Specify YES to request a prompt. For more information, see PROMPT= LIBNAME Statement Option.
Note: Use either PASSWORD= or PROMPT= in the LIBNAME statement. Do not use both.
SERVER=
specifies the network node name of the server host and the name server port number or service name. Two examples are "nsname.5400" or "nsname.spdsname". The default port number for SPD Server is 5400. The default service name is spdsname, if one is configured. Your installation might have been configured with a different port number and service name. For more information, see SERVER= LIBNAME Statement Option.
Note: You can use either SERVER=, HOST=, or the %SPDSHOST macro variable to specify the server host for your SPD Server connection. SERVER= is compatible with SAS/SHARE software.
SERVICE=
specifies the name server port number or service name. The default service name is spdsname. This service name must have been previously configured. Your administrator will tell you if it is available. This argument is used in conjunction with HOST=. Alias: SERV=.
USER=
specifies a server user ID. When ACL security is active, this user ID is given to you by the server administrator. When only UNIX file security is active, specify ANONYMOUS.For more information, see USER= LIBNAME Statement Option.

Optional Arguments

The following table contains a functional list of optional LIBNAME statement arguments supported by the SASSPDS engine.
Option
Description
User Validation Options
Names an ACL group that has been previously assigned to the server user ID. A server user ID can have definitions for 5 to 32 user groups, depending on how the server was configured.
Invokes special access to server resources in the server domain for a server user. The special privilege must already exist in the password database.
Data Processing Options
Specifies whether to use implicit automatic server sorts on BY clauses.
Controls how user proxy resources are assigned for a server user.
Specifies the end row number in a user-defined range for processing.
Invokes implicit SQL pass-through processing in the SPD Server session.
Configures the SPD Server connection to generate additional domain connections.
Record-level locking allows multiple users concurrent Read and Write access to server tables.
Compresses the data stream for a server network packet.
Invokes implicit SQL pass-through processing in the SPD Server session.
SCHEMA=
Specifies the server domain name.
Enables enhanced sharing of user proxies.
Specifies the start row number in a user-defined range for processing.
Controls the creation of a temporary server domain for this LIBNAME assignment.
Suppresses hard failure on NLS transcoding overflow and character mapping errors.
Specifies to use UNIX domain sockets for data transfers between the client and SPD Server.
Password Management Options
Specifies to prompt a server user for a new password.
Specifies a new password for a server client user.
Last updated: February 8, 2017