BookmarkSubscribeRSS Feed
tomrvincent
Rhodochrosite | Level 12

If your e-mail is of the form xyyyyy@domain.com (like jsmith@foobar.com ) you can use this to derive the email address from system variable _CLIENTUSERNAME:

 

    /* determine email address from _CLIENTUSERNAME */

    data _null_;
        emailaddress=trim(compress(lowcase(substr(scan(&_CLIENTUSERNAME, -1),1,1)||scan(&_CLIENTUSERNAME, 1))||'@domain.com'));
        firstname   =trim(compress(lowcase(scan(&_CLIENTUSERNAME,-1))));
        lastname    =trim(compress(lowcase(scan(&_CLIENTUSERNAME,+1))));
        call symput('firstname', trim(firstname));
        call symput('lastname', trim(lastname));
        call symput('emailaddress', trim(emailaddress));
    run;
    
    %put &=emailaddress;

2 REPLIES 2
Reeza
Super User

Hi @tomrvincent. It looks like you're trying to post content that can be shared/library type reference code for people. This is a great idea, please consider posting them as Articles rather than posts. Posts are typically for questions. I also like to keep a set over on github, personal choice.

 

https://communities.sas.com/t5/SAS-Communities-Library/tkb-p/library

And add New Article. 

 

Looking forward to seeing your posts!

 

 

tomrvincent
Rhodochrosite | Level 12

I had never heard of or seen that...thanks for the suggestion.

 

just tried it...got this:

 

You have not yet achieved the experience level on the community to create your own article. Keep coming back and posting discussion topics though, and you'll earn it!

 

oh, well...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 381 views
  • 1 like
  • 2 in conversation