![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/b/da/bda6fccb-b246-43e7-a520-a01ed647b8cf/bda6fccb-b246-43e7-a520-a01ed647b8cf-bg55.png)
The LIBNAME Statement for Relational Databases CAST_OVERHEAD_MAXPERCENT= LIBNAME Option 75
DECIMAL
DATE.
SAS/ACCESS limits data expansion for CAST= to 20 percent in order to trade rapid
data conversion by Teradata for extra data transmission. If casting does not exceed a 20
percent data increase, all candidate columns are cast. If the increase exceeds this limit,
then SAS attempts to cast Teradata DECIMAL types only. If casting DECIMAL types
only still exceeds the increase limit, data conversions are done by SAS.
You can alter the casting rules by using either the CAST= or
“CAST_OVERHEAD_MAXPERCENT= LIBNAME Option” on page 75 options. With
CAST_OVERHEAD_MAXPERCENT=, you can change the 20 percent overhead limit.
With CAST=, you can override the percentage rules:
CAST=YES forces Teradata to cast all candidate columns
CAST=NO cancels all Teradata casting
CAST= only applies when you are reading Teradata tables into SAS. It does not
apply when writing Teradata tables from SAS.
Also, CAST= only applies to SQL that SAS generates for you. If you supply your own
SQL with the explicit SQL feature of PROC SQL, you must code your own casting
clauses to force data conversions to occur in Teradata instead of SAS.
Examples
The following example demonstrates the use of the CAST= option in a LIBNAME
statement to force casting for all tables referenced:
libname mydblib teradata user=testuser pw=testpass cast=yes;
proc print data=mydblib.emp;
where empno<1000;
run;
proc print data=mydblib.sal;
where salary>50000;
run;
The following example demonstrates the use of the CAST= option in a table reference
in order to turn off casting for that table:
proc print data=mydblib.emp (cast=no);
where empno<1000;
run;
See Also
“CAST= Data Set Option” on page 166
CAST_OVERHEAD_MAXPERCENT= LIBNAME Option
Specifies the overhead limit for data conversions to be performed in Teradata instead of SAS
Valid in: the SAS/ACCESS LIBNAME statement
DBMS support: Teradata
Default value: 20 percent