64 Assigning a Libref Interactively Chapter 9
assign or de-assign a libref that refers to DBMS data, you omit this argument. For full
details about how to use SAS functions, see the SAS Language Reference: Dictionary.
Assigning a Libref Interactively
An easy way to associate a libref with a relational DBMS is to use the New Library
window. One method used to open this window is to issue the DMLIBASSIGN
command from your SAS session’s command box or command line. The window can also
be opened by clicking on the file cabinet icon on the SAS Explorer toolbar. In the figure
below, the user Samantha assigns a libref MYORADB to an Oracle database referred to
by the SQL*Net alias ORAHRDEPT. The LIBNAME option, SCHEMA=, enables the
user Samantha to access database objects that are owned by another user.
Display 9.1 New Library Window
The following list describes how to use the New Library window:
Name: enter the libref that you want to assign to a SAS data library or a relational
DBMS.
Engine: click the down arrow to select a name from the pull-down listing.
Enable at startup: click this if you want the specified libref to be assigned
automatically when you open a SAS session.
Library Information: these fields represent the SAS/ACCESS connection
options and vary according to SAS/ACCESS engine that you specify. Enter the
appropriate information for your site’s DBMS. The
Options field enables you to
enter SAS/ACCESS LIBNAME options. Use blanks to separate multiple options.
OK : click this button to assign the libref, or click Cancel to exit the window
without assigning a libref.
LIBNAME Statement Syntax for Relational Databases
Associates a SAS libref with a DBMS database, schema, server, or group of tables and views
Valid: Anywhere