Chapter Contents

Previous

Next
SAS/SHARE User's Guide

Pre-Defining SAS Data Libraries to the Server

Although it is not required, you can pre-define one or more selected SAS data libraries to the server for use by client applications. Advantages of pre-defining a library are

Be aware that the userid from which the server runs must have the appropriate permissions to access the SAS data library that you want to pre-define to a server. You should be familiar with the permissions requirements of the operating environment, the network, and the security software before you pre-define a library. For information about server security, see Server Security.


Methods for Pre-Defining a Server Library

Server administrators can pre-define a SAS data library to a server in the following ways:

Note:   In addition to these recommended methods, you can also define a libref externally to SAS. For this information, see the SAS documentation for your operating environment.  [cautionend]

Pre-Defining a Server Library by Using the LIBNAME Statement

In your server program, before specifying the PROC SERVER step, you may pre-define one or more SAS data libraries to the server. The following syntax is typical:

LIBNAME libref 'SAS-data-library' <options>;

How you specify the physical pathname of the SAS data library and options are host-specific. For details about the LIBNAME statement and host-specific options, see SAS Language Reference: Concepts and the SAS documentation for your operating environment.

Here is an example of how to pre-define a library to the server with the LIBNAME statement for a UNIX host:

libname mylib '/payroll/div2/emp';

After you define a library to the server, a message is displayed to the SAS log. An example of a message for a server on a UNIX host follows:

1     libname mylib '.'; 
NOTE: Libref MYLIB was successfully assigned as follows:
Engine: V8
Physical Name: /payroll/div2/emp

Pre-Defining a Server Library by Using the ALLOCATE LIBRARY Command in the OPERATE Procedure

From a server administrator session, while the server is running, pre-define one or more SAS data libraries to the server by using the following syntax:

PROC OPERATE SERVER=serverid;
ALLOCATE LIBRARY libref ' SAS-data-library' <options>;

How you specify the physical pathname of the SAS data library and options are host specific. For full details about the ALLOCATE LIBRARY command, see Allocating a Library to a Server That Is Already Running. For details about host-specific options, see SAS Language Reference: Dictionary and the SAS documentation for your operating environment.

Here is an example of how to use the ALLOCATE LIBRARY command of the OPERATE procedure for a Windows host:

proc operate server=share1;
  allocate library mylib '\payroll\dev2\emp';  


Chapter Contents

Previous

Next

Top of Page

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