BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RDS2020
Calcite | Level 5

Hi,

I am reading data from a Oracle table into temp table in WORK library.  While creating temp table in SAS it is replacing one of the column name character to $. So the column name in table is 

Actual Name- abc__   (it has 2 underscores)

SAS reading it as :- abc_$

And this is happening for all column names with double underscores but only on my SAS EG.

So 1 one of the underscore is getting replaced by "$" sign, now this code cant be changed because many others are using it and its working well on their SAS EG except min. Can anyone help with the solution why column is getting wrongly read by SAS.

Thanks ,

RDS

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
I suspect the issue is #4 then. You have some option/setting in your installation that isn't the same as your colleagues.
I'd start with the VALIDVARNAME option and see what your colleagues have.

This should post the info to the log or results window indicating what the option is set to. This option can be set in a few places so it may not be a 'code change' or could be in a different program you ran earlier or something like that. Is your SAS installation different than colleagues in some manner?

proc options option=validvarname;
run;

View solution in original post

5 REPLIES 5
Reeza
Super User

1. Are these variable names or labels being impacted?

2. How are you retrieving your data from the DB?

3. What is the length of the variable names in Oracle? Are they less than 32 characters in total?

4. What is your validvarname option set to? ANY is the default in EG, you most likely want it to be V7 though. 

 

 

RDS2020
Calcite | Level 5

Thanks for responding. It cannot be issue with code or reading since it is working fine for everyone else

 

1. Are these variable names or labels being impacted?

Reply 1- No, I am simply creating table by Selecting all from the oracle Table

2. How are you retrieving your data from the DB?

Reply 2- Inside a Proc Creating a table by selecting * from the table name 

3. What is the length of the variable names in Oracle? Are they less than 32 characters in total?

Reply 3- This code is working fine for all other colleagues so this cant be an issue. But still the characters in column name are between8-10 

4. What is your validvarname option set to? ANY is the default in EG, you most likely want it to be V7 though. 

Reply 4- I am not aware of this but this not set in Code for sure. You mean this has to be set in Code or in Option Tab. Cant set in the Code since change would be required for it.

 

Thankss,

RDS

 

Reeza
Super User
I suspect the issue is #4 then. You have some option/setting in your installation that isn't the same as your colleagues.
I'd start with the VALIDVARNAME option and see what your colleagues have.

This should post the info to the log or results window indicating what the option is set to. This option can be set in a few places so it may not be a 'code change' or could be in a different program you ran earlier or something like that. Is your SAS installation different than colleagues in some manner?

proc options option=validvarname;
run;
RDS2020
Calcite | Level 5
Thanks Reeza. It is #4. It is under Option->Data-> Data General-> Valid Variable Names. This needs to be changed to V7.
Appreciate your quick help.

RDS
Reeza
Super User
options validvarname = v7;

That's another way to change that setting. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 989 views
  • 2 likes
  • 2 in conversation