88 DBINDEX= LIBNAME Option Chapter 9
Default value: DBMS
Syntax
DBGEN_NAME= DBMS | SAS
Syntax Description
DBMS
specifies that the DBMS columns are renamed to valid SAS variable names.
Disallowed characters are converted to underscores. If a column is converted to a
name that already exists, then a sequence number is appended to the end of the new
name.
SAS
specifies that DBMS columns are renamed to the format _COL
n, where n is the
column number (starting with zero).
Details
SAS retains column names when it reads data from tables, unless a column name
contains characters that SAS does not allow, such as
$. SAS allows alphanumeric
characters and the underscore (_).
For example, if you specify DBGEN_NAME=SAS, a DBMS column named
Dept$Amt
is renamed to
_COLn
. If you specify DBGEN_NAME=DBMS, the
Dept$Amt column is
renamed to
Dept_Amt.
This option is intended primarily for National Language Support, notably for the
conversion of Kanji to English characters. English characters that are converted from
Kanji are often those that are not allowed in SAS.
Note: The various SAS/ACCESS interfaces each handled name collisions differently
in SAS Version 6. Some interfaces appended to the end of the name; other interfaces
replaced the last character(s) in the name. Some interfaces used a single sequence
number, other interfaces used unique counters. If you specify VALIDVARNAME= V6;
then name collisions must be handled the same as they were in SAS Version 6.
See Also
To apply this option to an individual data set, see the data set option
“DBGEN_NAME= Data Set Option” on page 174
DBINDEX= LIBNAME Option
Can be used to improve performance when processing a join that involves a large DBMS table and
a small SAS data set
Valid in: the SAS/ACCESS LIBNAME statement
DBMS support: DB2 UNIX/PC, Informix, ODBC, OLE DB, Oracle, Microsoft SQL
Server, SYBASE, Teradata
Default value: DBMS-specific