Chapter Contents

Previous

Next
DBSASTYPE=

DBSASTYPE=



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

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 DB2 data into SAS.

By default, the SAS/ACCESS Interface to DB2 converts each DB2 data type to a predetermined SAS data type when processing data from DB2. 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 DB2 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 DECIMAL(20), this enables SAS to print the values.

proc print data=mylib.mytable
   (DBSASTYPE=(mycolumn='CHAR(20)'));
run;

See LIBNAME Statement Data Conversions for more details on the default data types for DB2.


Chapter Contents

Previous

Next

Top of Page

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