DATA Step, Macro, Functions and more

Macro function to mask decimal place

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

Macro function to mask decimal place

Hello,

This will probably be easy for some one, but for the life of me I can't figure it out.

So, there is a macro variable like this:

   %let ICD_CODE =  V85.5

But I need to pass this macro variable as 'V855'  in query because this one

particular query uses that form.   All of the other queries uses the regular

macro variable value, V85.5.

So, how can I mask the decimal in the macro variable to pass to the query ?



Accepted Solutions
Solution
‎01-28-2013 10:11 PM
Super User
Super User
Posts: 7,039

Re: Macro function to mask decimal place

Use %SYSFUNC() to call the COMPRESS() function.

%sysfunc(compress(&icd_code,.))

View solution in original post


All Replies
Solution
‎01-28-2013 10:11 PM
Super User
Super User
Posts: 7,039

Re: Macro function to mask decimal place

Use %SYSFUNC() to call the COMPRESS() function.

%sysfunc(compress(&icd_code,.))

Contributor
Posts: 24

Re: Macro function to mask decimal place

Thank You, Tom !  that was perfect.   I knew someone would have the answer.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 197 views
  • 0 likes
  • 2 in conversation