Previous Page | Next Page

Statements

LIBNAME Statement for WebDAV Server Access



Associates a libref with a SAS library and enables access to a WebDAV (Web-based Distributed Authoring And Versioning) server.
Valid: Anywhere
Category: Data Access
Restriction: Access to WebDAV servers is not supported on OpenVMS or z/OS.
See also: Base SAS LIBNAME Statement

Syntax
Arguments
Options
WebDAV Specific Options
Data Set Options That Function Differently with a WebDAV Server
Details
WebDAV File Processing
Multiple Librefs to a WebDAV Library
Locked Files on a WebDAV Server
Example
See Also

Syntax

LIBNAME libref <engine> 'SAS-library' < options> WEBDAV USER="user-ID" PASSWORD="user-password" WEBDAV options;
LIBNAME libref CLEAR | _ALL_ CLEAR;
LIBNAME libref LIST | _ALL_ LIST;


Arguments

libref

specifies a shortcut name for the aggregate storage location where your SAS files are stored.

Tip: The association between a libref and a SAS library lasts only for the duration of the SAS session or until you change it or discontinue it with another LIBNAME statement.
'SAS-library'

specifies the URL location (path) on a WebDAV server. The URL specifies either HTTP or HTTPS communication protocols.

Restriction: Only one data library is supported when using the WebDAV extension to the LIBNAME statement.
Requirement: When using the HTTPS communication protocol, you must use the SSL (Secure Sockets Layer) protocol that provides secure network communications. For more information, see Encryption in SAS.
engine

specifies the name of a valid SAS engine.

Restriction: REMOTE engines are not supported with the WebDAV options.
See: For a list of valid engines, see the SAS documentation for your operating environment.
CLEAR

disassociates one or more currently assigned librefs. When a libref using a WebDAV server is cleared, the cached files stored locally are deleted also.

Tip: Specify libref to disassociate a single libref. Specify _ALL_ to disassociate all currently assigned librefs.
LIST

writes the attributes of one or more SAS libraries to the SAS log.

Tip: Specify libref to list the attributes of a single SAS library. Specify _ALL_ to list the attributes of all SAS libraries that have librefs in your current session.
_ALL_

specifies that the CLEAR or LIST argument applies to all currently assigned librefs.


Options

For valid LIBNAME statement options, see LIBNAME Statement.


WebDAV Specific Options

WEBDAV

specifies that the libref access a WebDAV server.

USER="user-ID"

specifies the user name for access to the WebDAV server. The user ID is case sensitive and it must be enclosed in single or double quotation marks.

Alias: UID
Tip: If PROMPT is specified, but USER= is not, then the user is prompted for an ID as well as a password.
PASSWORD="user-password"

specifies a password for the user to access the WebDAV server. The password is case sensitive and it must be enclosed in single or double quotation marks.

Alias: PWD=, PW=, PASS=
Tip: You can specify the PROMPT option instead of the PASSWORD= option.
PROMPT

specifies to prompt for the user login password, if necessary.

Interaction: If PROMPT is specified without USER=, then the user is prompted for an ID, as well as a password.
Tip: If you specify the PROMPT option, you do not need to specify the PASSWORD= option.
AUTHDOMAIN="auth-domain"

specifies the name of an authentication domain metadata object in order to connect to the WebDAV server. The authentication domain references credentials (user ID and password) without your having to explicitly specify the credentials. The auth-domain name is case sensitive, and it must be enclosed in double quotation marks.

An 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 the WebDAV server and is resolved by the BASE engine calling the SAS Metadata Server and returning the authentication credentials.

Requirement: The authentication domain and the associated login definition must be stored in a metadata repository, and the metadata server must be running in order to resolve the metadata object specification.
Interaction: If you specify AUTHDOMAIN=, you do not need to specify USER= and PASSWORD=.
See also: For complete information about creating and using authentication domains, see the discussion on credential management in the SAS Intelligence Platform: Security Administration Guide.
PROXY=url

specifies the Uniform Resource Locator (URL) for the proxy server in one of these forms:

"http://hostname"

"http://hostname:port"

LOCALCACHE="directory name"

specifies a directory where a temporary subdirectory is created to hold local copies of the server files. Each libref has its own unique subdirectory. If a directory is not specified, then the subdirectories are created in the SAS WORK directory. SAS deletes the temporary files when the SAS program completes.

Default: SAS WORK directory
LOCKDURATION=n

specifies the number of minutes that the files written through the WebDAV libref are locked. SAS unlocks the files when the SAS program successfully completes. If the SAS program fails, then the locks expire after the time allotted.

Default: 30

Data Set Options That Function Differently with a WebDAV Server

The following table lists the data set options that have different functionality when using a WebDAV server. All other data set options will function as described in the SAS Language Reference: Dictionary.

Data Set Option Functionality with a WebDAV Server
Data Set Option WebDAV Storage Functionality
CNTLLEV= LIB locks all data sets in the library before writing the data into the local cache. All members are unlocked after the DATA step has completed and the data set has been written back to the WebDAV server.

MEM locks the member before writing the data into the local cache. Member is unlocked after the DATA step has completed and the data has been written back to the WebDAV server.

REC is not supported. WebDAV allows updates to the entire data set only.

FILECLOSE The VxTAPE engine is not supported; therefore this option is ignored.
GENMAX= This functionality is not supported because the maximum number of revisions to keep cannot be specified in the WebDAV server.
GENNUM= This functionality is not supported in WebDAV.
IDXNAME= Users can specify an index to use if one exists.
INDEX= Indexes can be created in the local cache and saved on the WebDAV server.
TOBSNO= Remote engines are not supported; therefore this option is ignored.


Details


WebDAV File Processing

When accessing a WebDAV server, the file is pulled from the WebDAV server to your local disk storage for processing. When you complete the updating, the file is pushed back to the WebDAV server for storage. The file is removed from the local disk storage when it is pushed back.


Multiple Librefs to a WebDAV Library

When you assign a libref to a file on a WebDAV server, the path (URL location), user ID, and password are associated with that libref. After the first libref has been assigned, the user ID and password will be validated on subsequent attempts to assign another libref to the same library.

Note:   Lock errors that you typically would not see might occur if either a different user ID or the password, or both, are used in the subsequent attempt to assign a libref to the same library.  [cautionend]


Locked Files on a WebDAV Server

In local libraries, SAS locks a file when you open it to prevent other users from altering the file while it is being read. WebDAV locks require write access to a library, and there is no concept of a read lock. In addition, WebDAV servers can go down, come back up, or go offline at any time. Consequently, SAS honors a lock request on a file on a WebDAV server only if the file is already locked by another user.


Example

The following example associates the libref davdata with the WebDAV directory /users/mydir/datadir on the WebDAV server www.webserver.com:

libname davdata v9 "https://www.webserver.com/users/mydir/datadir"
        webdav user="mydir" pw="12345";


See Also

Statements:

FILENAME Statement, WebDAV Access Method

LIBNAME Statement

Previous Page | Next Page | Top of Page