BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

The string 'manual' is never going to equal the string 'Transition Type'.

 

You cannot reference a variable with a string literal.  If you want to use non-valid names for your variables you need to reference them using name literals.  

if "Transmission Type"n = 'manual' then Newvar = '0';

 

But to make your coding much easier just change the setting of the VALIDVARNAME option to V7 instead of ANY before you run the PROC IMPORT.  Then PROC IMPORT will create valid SAS names for the variables in your XLS file that have headers that are not valid SAS names..

if Transmission_Type = 'manual' then Newvar = '0';

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 3405 views
  • 0 likes
  • 3 in conversation