Chapter Contents


SAS/SHARE User's Guide


The LIBDEF macro generates a LIBNAME statement.


%LIBDEF (libref,<SAS-data-library>, <READONLY>, <RETRY>, <ENGINE=>local-engine, <RENGINE=remote-engine >,
<RMTVIEW=remote-engine-RMTVIEW=-option>, <SLIBREF=server-library>, <uapw>, <APPLSYS=appl-sys-lib-table>);

The LIBDEF macro generates a LIBNAME statement to define a SAS data library that will be accessed locally or through a server. The server administrator can specify a physical name or a reserved libref in the APPLSYS macro library. If the physical name is specified, the server administrator must supply it as the second argument to this macro; the physical name should not be enclosed in quotes. If a libref is specified, the administrator must omit the second argument.

If you specify a physical name that is not specified in the APPLSYS macro library, a LIBNAME statement is generated without the SERVER= option.

specifies that the server library be accessed in read-only mode.

If a LIBNAME statement specifying the SERVER= option fails, LIBDEF generates a LIBNAME statement without the SERVER= option.

specifies the local engine to be used in the user's session to access the library. The default is ENGINE=REMOTE. Omit this parameter unless you need to override the default engine.

specifies the remote engine to be used in the server session to access the library. There is no default for this parameter. SAS chooses an appropriate engine. Omit this parameter unless you need to override the engine that is chosen by SAS.

specifies the value of the REMOTE engine's RMTVIEW= option in the LIBNAME statement that the LIBDEF macro generates. This parameter can be used to override the default value of this option for a specific library. This parameter overrides the RMTVIEW= parameter to the SERVINFO and SERVLIB macros.

specifies the libref that references the specified library in the server session. If this parameter is specified, the generated LIBNAME statement will include the SLIBREF= option. This parameter overrides any value that is specified for the SAS-data-library argument to the LIBDEF macro statement.

specifies that a user can access the server only by supplying a password.

specifies a new application system library table to be loaded. This argument is ignored if the table has already been specified in the SHRMACS call or in a previous LIBDEF call.

After executing the LIBDEF macro, the automatic macro variable SYSLIBRC contains the return code from the LIBNAME statement. See SAS Guide to Macro Processing for more information about automatic macro variables.

%libdef(mylib,SAS-data-library,applsys=qa); %libdef(perm,SAS-data-library,readonly,retry,myuserpw);

Chapter Contents



Top of Page

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