- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-29-2024 07:11 AM
(916 views)
Good day,
How can i get change my username in SAS studio. My instructor requires my username to be my actual name.
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Good morning, Are you using SAS Studio through SAS OnDemand for Academics? If so, user names are assigned by the system and cannot be edited by the user. Are you sure your instructor wants you to change your user name and not something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi TTMunnings0608,
I believe your username is fixed, but you could apply a SAS format to it, so it shows with your full name:
PROC FORMAT;
VALUE $fullname
'hollandnumerics' = 'Philip Holland'
;
RUN;
DATA _NULL_;
LENGTH username $10;
FORMAT username $fullname30.;
username = "&sysuserid.";
PUT username=;
RUN;
Just update the $fullname format to map your SAS Studio username to your full name, and see what happens.
..........Phil
Philip R Holland
Recent book (see my blog site): "SAS Programming Experiences: A How-To Guide from a Power SAS User"
Recent book (see my blog site): "SAS Programming Experiences: A How-To Guide from a Power SAS User"
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What a neat trick, @hollandnumerics!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
And with the format defined use
%sysfunc(putc(&sysuserid. , $fullname.))
Just about anywhere you would be expected to need the name. If the code would expect to be in quotes, such as Title/footnote statement, filename, or text value then make sure the quotes are double quotes so the macro values resolve.
Title "Exercise One Results by %sysfunc(putc(&sysuserid. , $fullname.)) ";
Or for the truly lazy: something like this
%let sname = %sysfunc(putc(&sysuserid. , $fullname.));
And use the value of &sname:
Title "Exercise Two Results by &sname.";