BookmarkSubscribeRSS Feed
thanikondharish
Fluorite | Level 6

data have ;

name='sdkfksf%%&545453435' ;

new1=comperss(name,  ,'kp') ;

run;

if we run above program new1 variable have only punctuals .

what is the meaning of second argument in compress function?

2 REPLIES 2
Reeza
Super User

The second argument is the character list which specifies the characters you want to have removed. If you only wanted hyphens removed it would be a hyphen in quotes. 

 

I would suggest bookmarking this page:

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=pgmsashome&docsetTarget=h...

 

Then click on Functions, find the function of interest and you can see all the details for that particular function, such as RAND() or COMPRESS.

 


@thanikondharish wrote:

data have ;

name='sdkfksf%%&545453435' ;

new1=comperss(name,  ,'kp') ;

run;

if we run above program new1 variable have only punctuals .

what is the meaning of second argument in compress function?


 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 992 views
  • 3 likes
  • 3 in conversation