DATA Step, Macro, Functions and more

compress(name,'!','A') ?

Accepted Solution Solved
Reply
Super Contributor
Posts: 319
Accepted Solution

compress(name,'!','A') ?

Hello:

 

Could someone let me know what the '!' stand for?  Thanks.

 

 


Accepted Solutions
Solution
‎06-30-2017 08:16 PM
Super User
Posts: 3,250

Re: compress(name,'!','A') ?

This statement says remove all alphabetic characters plus exclamation marks from the variable NAME. Refer to the documentation:

 

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#n0fcshr0ir3...

 

The second parameter lists the characters to remove, the third parameter modifies the list of characters to remove. It would be stating the obvious that removing all alphabetic characters from NAME doesn't make much sense.

 

 

View solution in original post


All Replies
Solution
‎06-30-2017 08:16 PM
Super User
Posts: 3,250

Re: compress(name,'!','A') ?

This statement says remove all alphabetic characters plus exclamation marks from the variable NAME. Refer to the documentation:

 

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#n0fcshr0ir3...

 

The second parameter lists the characters to remove, the third parameter modifies the list of characters to remove. It would be stating the obvious that removing all alphabetic characters from NAME doesn't make much sense.

 

 

Super User
Posts: 19,770

Re: compress(name,'!','A') ?

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 124 views
  • 1 like
  • 3 in conversation