A SERVICE OF

logo

226 VALIDVARNAME= System Option Chapter 11
Any column name that is not unique when it is normalized is made unique by
appending a counter (0,1,2,...) to the name.
This is the default value for SAS Version 7 and later versions.
VALIDVARNAME=V6
indicates that only those variable names that are considered valid in Version 6 are
considered valid SAS variable names. When V6 is specified in Pass-Through
Facility code, the DBMS engine truncates column names to 8 characters as it did
in Version 6. If required, numbers are appended to the end of the truncated name
to make it unique.
VALIDVARNAME=UPCASE
indicates that a DBMS column name is changed to a valid SAS name as described
in VALIDVARNAME=V7 except that variable names are in uppercase.
VALIDVARNAME=ANY
allows any characters in DBMS column names to appear as valid characters in
SAS variable names. Symbols, such as the equal sign (=) and the asterisk (*), must
be contained in a
’varname’n construct. You must use ANY whenever you want to
read DBMS column names that do not follow the SAS naming conventions.
See Also
“Introduction to SAS/ACCESS Naming” on page 7
Example
The following example shows how the Pass-Through Facility works with
VALIDVARNAME=V6.
options validvarname=v6;
proc sql;
connect to oracle (user=testuser pass=testpass);
create view myview as
select amount_b, amount_s
from connection to oracle
(select "Amount Budgeted$", "Amount Spent$"
from mytable);
quit;
proc contents data=myview;
run;
The output from this example would show that "Amount Budgeted$" becomes
AMOUNT_B and "Amount Spent$" becomes AMOUNT_S.