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';

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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
  • 15 replies
  • 1114 views
  • 0 likes
  • 3 in conversation