BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hkotian
Calcite | Level 5
We have created a SAS dataset from an Excel file in SAS EG . We do not have PC file formats installed on UNIX, so I am using the import wizard in EG to import the Excel file. When I try to access the SAS dataset in Enterprise Miner, it says it cannot access table. EG can open the dataset without any issues.

However, when we run the PROC IMPORT in PC SAS and then access the SAS dataset created using Enterprise Miner, we are able to access thedataset without any issues.
1 ACCEPTED SOLUTION

Accepted Solutions
udo_sas
SAS Employee
When using VALIDVARNAME=ANY your SAS variable can begin with or contain any characters, including blanks.With other words not only the Excel variable name can contain blanks but the SAS variables which will be created after importing will contain these blanks as well. You might want to verify this by checking the SAS variable names of your table after importing.
For more information about the recommended usage of VALIDVARNAME please refer to online help: http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000279245.htm
Hope that helps,
Udo

View solution in original post

3 REPLIES 3
udo_sas
SAS Employee
It appears that your Excel file contains variables names that are not in standard SAS format (i.e. some may contain a blank space).
By default, Enterprise Guide executes the statement "options validvarname=any;".
This setting of the VALIDVARNAME system option allows the use of column
names that contain embedded spaces and special characters.
For more information please refer to: http://support.sas.com/kb/14/661.html
I would suggest to remove these blanks before importing the Excel file.
Hope this helps,
Udo
hkotian
Calcite | Level 5
You are right.........it was the spaces that was causing the problem with the import........but i did check the validvarname = any option in SAS EG and it is set to default to any .....

but yet when I removed the spaces it worked .......the only thing i'm wondering is why ??
udo_sas
SAS Employee
When using VALIDVARNAME=ANY your SAS variable can begin with or contain any characters, including blanks.With other words not only the Excel variable name can contain blanks but the SAS variables which will be created after importing will contain these blanks as well. You might want to verify this by checking the SAS variable names of your table after importing.
For more information about the recommended usage of VALIDVARNAME please refer to online help: http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000279245.htm
Hope that helps,
Udo

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 5025 views
  • 0 likes
  • 2 in conversation