Chapter Contents

Previous

Next
DBSASTYPE=

DBSASTYPE=



Specifies data type(s) to override the default SAS data type(s) during input processing of data through ODBC.

Default value: Varies by data type.


Syntax
Details

Syntax

DBSASTYPE=(<column-name-1=<'>SAS-data-type<'>> <...<column-name-n=<'SAS-data-type<'>>>)

column-name
specifies a DBMS column name.

SAS-data-type
specifies one of the following SAS data types:


Details

This option is valid only when you read data into SAS thorough ODBC.

By default, the SAS/ACCESS Interface to ODBC converts each ODBC data type to a predetermined SAS data type when processing data through ODBC. When you need a different data type, you can use DBSASTYPE= to override the default data type chosen by the SAS/ACCESS engine. SAS forces the ODBC driver to perform the data conversions. Some conversions might not be supported; if a conversion is not supported, SAS prints an error to the log.

In the following example, DBSASTYPE= specifies a data type to use for the column MYCOLUMN when printing the DBMS data in SAS. If the data in this DBMS column is 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;

See ODBC Data Types for more details on the default data types for ODBC.


Chapter Contents

Previous

Next

Top of Page

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