BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi. I am new to SAS (I havent had training yet - but did take the tutorial) and I am looking for a way to format data that I am using in EG. I have a column in my data that is based on customer names. Some names have additional info on the end that I need to remove. IE
1. JOHN DOE
2. JOHN DOE@SAS.COM
If I wanted to strip the @SAS.com or everything after the @ , How would I do that?
In the example above I would want John Doe counted twice not 2 different entries.
Thanks.
1 REPLY 1
deleted_user
Not applicable
You can use the following function:

var2 = scan ( var1 , 1 , '@' );

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 991 views
  • 0 likes
  • 1 in conversation