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

Hi,

 

I need to check few symbols while applying PROPCASE on my data. Underscore is part of my symbols. When I included underscore in my code as O_NAM1 = PROPCASE(I_NAM1, " .<(+|&!$*);¬-/,%_`"), I got a warning "Apparent invocation of macro _ not resolved". How can I include underscore in my code? When I kept the underscore in single quotes, pgm considered single quote as a valid symbol and checked the data for single quote. I don't want to search data for single quote.

 

Thanks in advance!!

SAS@EMMAUS
1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

%_ would be a valid name for a macro.  To fix the problem, just switch the order within your string:  _% instead of %_

View solution in original post

4 REPLIES 4
Astounding
PROC Star

%_ would be a valid name for a macro.  To fix the problem, just switch the order within your string:  _% instead of %_

gandikk
Obsidian | Level 7

Thank you!!

 

SAS@EMMAUS
ballardw
Super User

Or use single quotes to delimit the string.

gandikk
Obsidian | Level 7
Thank you!!
SAS@EMMAUS

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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