A SERVICE OF

logo

186 DBSLICE= Data Set Option Chapter 10
stored in a format that SAS does not support, such as SQL_DOUBLE(20), this enables
SAS to print the values.
proc print data=mylib.mytable
(DBSASTYPE=(mycolumn=’CHAR(20)’));
run;
In the following example, the data stored in the DBMS FIBERSIZE column has a
data type that provides more precision than what SAS could accurately support, such
as DECIMAL(20). If you just used a PROC PRINT on the DBMS table, the data might
be rounded or displayed as a missing value. Instead, you could use the DBSASTYPE=
option to convert the column to a character field of the length 21. Because the DBMS
performs the conversion before the data is brought into SAS, there is no loss of precision.
proc print data=mylib.specprod
(DBSASTYPE=(fibersize=’CHAR(21)’));
run;
In the following example, you use the DBSASTYPE= option to append one table to
another when the data types are not comparable. If the SAS data set has a variable
CITY defined as CHAR(20) and the DBMS table has a column defined as DECIMAL
(20), you can use DBSASTYPE= to make them match:
proc append base=dblib.hrdata (DBSASTYPE=(city=’CHAR(20)’));
data=saslib.personnel;
run;
DBSASTYPE= specifies to SAS that the CITY is defined as a character field of length
20. When a row is inserted from the SAS data set into a DBMS table, the DBMS
performs a conversion of the character field to the DBMS data type DECIMAL(20).
DBSLICE= Data Set Option
Specifies user-supplied WHERE clauses to partition a DBMS query into component queries for
threaded reads
Valid in:
DATA and PROC steps (when accessing DBMS data using SAS/ACCESS
software)
DBMS support: DB2 UNIX/PC, ODBC, Oracle, SYBASE, Teradata
Default value:
none
Syntax
DBSLICE=("WHERE-clause-1""WHERE-clause-2" < ... "WHERE-clause-n">)
DBSLICE=(<server=>"WHERE-clause-1"<server=>" WHERE-clause-2" < ...
<server=>"WHERE-clause-n">)
Syntax Description
syntax diagrams