DATA Step, Macro, Functions and more

How to remove . in SAS varaible?

Accepted Solution Solved
Reply
Super Contributor
Posts: 436
Accepted Solution

How to remove . in SAS varaible?

I've a variable called name and from this I need to remove dot(.). Although I tried with compress function, it went vain.

DONALD M. VARN

to

DONALD M  VARN


Accepted Solutions
Solution
‎03-02-2015 01:47 AM
Super User
Posts: 7,842

Re: How to remove . in SAS varaible?

You obviously did not really read the documentation of the compress() function. (Do that. NOW!)

data _null_;

x = 'DONALD M. VARN';

x1 = compress(x,'.');

put x1=;

run;

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎03-02-2015 01:47 AM
Super User
Posts: 7,842

Re: How to remove . in SAS varaible?

You obviously did not really read the documentation of the compress() function. (Do that. NOW!)

data _null_;

x = 'DONALD M. VARN';

x1 = compress(x,'.');

put x1=;

run;

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
🔒 This topic is solved and locked.

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

Discussion stats
  • 1 reply
  • 180 views
  • 0 likes
  • 2 in conversation