Controls the type of SAS variable names that can be used or created during a SAS session.
| Valid in: | configuration file, SAS invocation, OPTIONS statement, SAS System Options window |
|---|---|
| Category: | Files: SAS Files |
| Default: | V7 |
| See: | Introduction to SAS/ACCESS Naming, VALIDMEMNAME= system option |
Table of Contents
indicates that a DBMS column name is changed to a valid SAS name, following these rules:
indicates that a DBMS column name is changed to a valid SAS name, following these rules. This is the default value for SAS 7 and later.
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.
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 'variable-name'n construct.
You must use ANY whenever you want to read DBMS column names that
do not follow the SAS naming conventions.
Up to 32 characters are allowed in a column name.
Any column name that is not unique when it is normalized is made unique by appending a count (0, 1, 2, and so on).
The VALIDVARNAME= system option is supported for all DBMSs that support the SQL pass-through facility. You can set this option on start-up or in an OPTIONS statement, and the option value is used in the call to the SQL procedure. Alternatively, you can specify the VALIDVARNAME= option in the CONNECT statement.
The VALIDVARNAME= system option is often used with the VALIDMEMNAME= system option. For more information, see VALIDMEMNAME= System Option in SAS System Options: Reference.
This example shows how the SQL pass-through facility works with VALIDVARNAME=V6.
options validvarname=v6;
proc sql;
connect to hadoop (user=myusr1 pass=mypwd1);
create view myview as
select amount_b, amount_s
from connection to hadoop
(select "Amount Budgeted$", "Amount Spent$"
from mytable);
quit;
proc contents data=myview;
run;
Output from this example would show that "Amount Budgeted$" becomes AMOUNT_B and "Amount Spent$" becomes AMOUNT_S.
This example shows how you can pass VALIDVARNAME= as a connection option in the CONNECT statement in the SQL procedure.
proc sql;
drop view work.TLV1;
connect to hadoop ( validvarname=v7 server="myserver" port=5433
user=myuserid password=mypwd database=test);
exec("drop table vartb") by hadoop;
exec("create table vartb ( c1234567890 int,
c123456789012345678 float ) ") by hadoop;
exec("insert into vartb values (123, 3.14159)") by hadoop;
create view tlv1 as
select * from connection to hadoop (select * from vartb);
quit;