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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1030 views
  • 0 likes
  • 3 in conversation