DBGEN_NAME= Data Set Option

Specifies how SAS renames columns automatically when they contain characters that SAS does not allow.

Valid in: DATA and PROC steps
Default: DBMS
Supports: All

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 column names, using the format _COLn, where n is the column number (starting with zero). If a name is converted to a name that already exists, a sequence number is appended to the end of the new name.

Details

SAS retains column names when reading data from DBMS tables, unless a column name contains characters that SAS does not allow, such as $ or @. SAS allows alphanumeric characters and the underscore (_).
This option is intended primarily for National Language Support, notably the conversion of kanji to English characters because the English characters that are converted from kanji are often those that are not allowed in SAS.

Example:

If you specify DBGEN_NAME=SAS, a DBMS column named Dept$Amt is renamed to _COLn where n is the column number.
If you specify DBGEN_NAME=DBMS,a DBMS column named Dept$Amt is renamed to Dept_Amt.