
Data Set Options for Relational Databases DBLINK= Data Set Option 179
Example
In the following example, a SAS data set NEW is created with one variable C1. This
variable is assigned a label of DEPTNUM. In the second DATA step, the
MYDBLIB.MYDEPT table is created by using DEPTNUM as the DBMS column name.
Setting DBLABEL=YES enables the label to be used as the column name.
data new;
label c1=’deptnum’;
c1=001;
run;
data mydblib.mydept(dblabel=yes);
set new;
run;
proc print data=mydblib.mydept;
run;
DBLINK= Data Set Option
Specifies a link from your default database to another database on the server to which you are
connected (in the SYBASE interface); and specifies a link from your local database to database
objects on another server (in the Oracle interface)
Valid in:
DATA and PROC steps (when accessing DBMS data using SAS/ACCESS
software)
DBMS support: Oracle, SYBASE
Default value:
LIBNAME setting
Syntax
DBLINK=database-link
Details
This option operates differently in each DBMS.
Oracle Details: A link is a database object that identifies an object that is stored in a
remote database. A link contains stored path information and may also contain user
name and password information for connecting to the remote database. If you specify a
link, SAS uses the link to access remote objects. If you omit DBLINK=, SAS accesses
objects in the local database.
SYBASE Details: This option enables you to link to another database within the
same server to which you are connected. If you omit DBLINK=, SAS can only access
objects in your default database.