Chapter Contents |
Previous |
Next |
SAS/CONNECT User's Guide |
LIBNAME libref <'SAS-data-library'> SERVER=remote-session-id <ACCESS=READONLY> <OUTREP= format> <SLIBREF=server-libref> <engine-options>; |
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 SLIBREF= option, the libref that you specify is presumed to match a libref that you previously defined in your remote session. Information about the SLIBREF= option appears later in this chapter.
If you omit the physical name, you can access the library by the libref argument if it has already been defined to a remote session or by the SLIBREF= option. Information about the SLIBREF= option appears later in this chapter.
For more information about this option, see the LIBNAME statement in SAS Language Reference: Dictionary.
A data set is always converted to the remote host's format before writing to disk or reading for a local host. Therefore, attempting to convert a data set on the remote host to another host'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.
The valid format values for the OUTREP= option in Version 7 and later versions are:
¹ Support for these values was introduced in Version 8.
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 remote session's SAS session. When views are interpreted in the remote SAS session, the remote session may require large amounts of processor time and storage, but the amount of data transferred to the local host's SAS session may be reduced. Conversely, disallowing view processing by the remote session might increase the amount of data transferred between the remote session and the local host's SAS session but prevents the remote session from using more than minimal processing time.
If you set the value of this option to NO, SAS data views are interpreted in the local host SAS session.
Examples |
libname sqldslib 'sasxyz.viewlib.sasdata' server=mvshost;The preceding statement associates the libref SQLDSLIB with the SAS data library SASXYZ.VIEWLIB.SASDATA. This library will be accessed through the server MVSHOST, which is running in a remote CONNECT SAS session.
libname applib slibref=servlib server=myhost;The preceding statement associates the local host's libref APPLIB with the remote host's libref SERVLIB. This library is accessed through the remote host MYHOST.
A single-user server is initialized in the remote SAS environment when a LIBNAME statement that references a SAS data library in the remote environment is executed by the local SAS session. No action is needed in the remote environment to initialize the server. All actions are controlled from the local SAS session. To start the server,
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.