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-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!

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