SAS Data Set Connection Arguments
To access a SAS data set, you can submit a fully
specified connection string, which defines how to connect to the data.
Syntax
CATALOG= catalog-identifier;
DRIVER=BASE;
SCHEMA=(attributes);<ACCESS=READONLY
| TEMP; >
<COMPRESS=NO
| YES | CHAR | BINARY; >
<ENCODING=encoding-value;>
<LOCKTABLE=SHARE
| EXCLUSIVE; >
NAME=schema-identifier;
PRIMARYPATH=physical-location;
Data Source Connection Arguments
- CATALOG=catalog-identifier;
-
specifies the name
of an SQL catalog that is defined for the BASE data service on the
DataFlux Federation Server. A catalog groups logically related schemas.
A catalog name can be up to 32 characters long.
Requirement:You must specify a catalog.
Note:You can specify more than one catalog. For example:
"driver=fedsql;
conopts=((driver=base;catalog=basea;
schema=(name=one;primarypath='c:\data\basedata'));
(driver=base;catalog=baseb;
schema=(name=two;primarypath='c:\myfiles')))";
- DRIVER=BASE;
-
identifies the data
source that you want to access, which is a SAS data set.
Requirement:You must specify DRIVER=BASE to access a SAS data set.
- SCHEMA=(attributes);
-
specifies schema attributes
that are specific to a SAS data set. A schema is a data container
object that groups tables, which is unique within the catalog that
qualifies table names. For a SAS data set, a schema is similar to
a SAS library, which is a collection of tables and which has assigned
attributes.
- ACCESS=READONLY | TEMP;
-
- READONLY
-
assigns a read-only
attribute to the schema. You cannot open a SAS data set to update
or write new information.
- TEMP
-
specifies that the
SAS data sets be treated as scratch files. That is, the system will
not consume CPU cycles to ensure that the files do not become corrupted.
Interaction:This is an optional attribute.
Tip:Use ACCESS=TEMP to save resources only when the data is
recoverable. If TEMP is specified, data in memory might not be written
to disk on a regular basis. This saves I/O, but could cause a loss
of data if there is a crash.
- COMPRESS=NO | YES | CHAR | BINARY;
-
controls the compression
of rows in created SAS data sets.
- NO
-
specifies that the
rows in a newly created SAS data set are uncompressed (fixed-length
records). This is the default.
- YES | CHAR
-
specifies that the
rows in a newly created SAS data set are compressed (variable-length
records) by using RLE (Run Length Encoding). RLE compresses rows by
reducing repeated consecutive characters (including blanks) to two-
or three-byte representations.
Tip:Use this compression algorithm for character data.
- BINARY
-
specifies that the
rows in a newly created SAS data set are compressed (variable-length
records) by using RDC (Ross Data Compression). RDC combines run-length
encoding and sliding-window compression to compress the file.
Tip:This method is highly effective for compressing medium
to large (several hundred bytes or larger) blocks of binary data (numeric
columns). Because the compression function operates on a single record
at a time, the record length must be several hundred bytes or larger
for effective compression.
Default:NO
See:For more information about compressing, see SAS Language Reference: Concepts
- ENCODING=encoding-value;
-
overrides and transcodes
the encoding for input or output processing of SAS data sets.
Default:The default value is the current SAS session setting.
- LOCKTABLE=SHARE | EXCLUSIVE
-
places exclusive or
shared locks on SAS data sets. You can lock tables only if you are
the owner or have been granted the necessary privilege.
- SHARE
-
locks tables in shared
mode, allowing other users or processes to read data from the tables,
but preventing other users from updating.
- EXCLUSIVE
-
locks tables exclusively,
preventing other users from accessing any table that you open.
Default:The default value is SHARE.
- NAME=schema-identifier;
-
specifies the name
of an SQL schema that is defined on the DataFlux Federation Server.
The schema identifier is an alias for the physical location of the
SAS library, which is much like the Base SAS libref. A schema name
must be a valid SAS name and can be up to 32 characters long.
Requirement:You must specify a schema identifier.
- PRIMARYPATH=physical-location;
-
specifies the physical
location for the SAS library, which is a collection of one or more
SAS files. For example, in directory-based operating environments,
a SAS library is a group of SAS files that are stored in the same
directory.
Requirement:You must specify a primary path.
Requirement:Include the attributes within parentheses, and separate
each attribute with a semicolon. For example:
schema=(name=one;primarypath='c:\data\basedata')
Note:You can specify more than one schema. For example:
driver=base;catalog=base;
schema=(name=one;primarypath='c:\data\basedata')
schema=(name=two;primarypath='c:\temp')
schema=(name=three;primarypath='c:\myfiles')