174 DBGEN_NAME= Data Set Option Chapter 10
The SAS data set option FORCE= overrides this option when it is used with PROC
APPEND or the PROC SQL UPDATE statement. The PROC SQL UPDATE statement
does not provide a warning before truncating the data.
Example
In the following example, two librefs are associated with Oracle databases; the
default databases and schemas are used and therefore are not specified. In the DATA
step, MYDBLIB.DEPT is created from the Oracle data referenced by
MYORALIB.STAFF. The LASTNAME variable is a character variable of length 20 in
MYORALIB.STAFF. During the creation of MYDBLIB.DEPT, the LASTNAME variable
is stored as a column of type character and length 10 by using DBFORCE=YES.
libname myoralib oracle user=tester1 password=tst1;
libname mydblib oracle user=lee password=dataman;
data mydblib.dept(dbtype=(lastname=’char(10)’)
dbforce=yes);
set myoralib.staff;
run;
See Also
“DBTYPE= Data Set Option” on page 190
DBGEN_NAME= Data Set Option
Specifies whether to rename columns automatically when they contain characters that SAS does
not allow
Valid in:
DATA and PROC steps (when accessing DBMS data using SAS/ACCESS
software)
DBMS support:
DB2 OS/390, DB2 UNIX/PC, Informix, ODBC, OLE DB, Oracle, Microsoft
SQL Server, SYBASE, Teradata
Default value: DBMS
Syntax
DBGEN_NAME=DBMS | SAS
Syntax Description
DBMS
specifies that disallowed characters are converted to underscores.
SAS
specifies that DBMS columns that contain disallowed characters are converted into
valid SAS variable names, using the format _COLn, where n is the column number