SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
holcoje
Calcite | Level 5

I have a group in SAS Management Console 9.4 with a list of users. That group is given authorization to run a stored process that generates a report. Is there a way to use the USER ID of the group member in the stored process SAS code? My end goal is to append the USER ID to the name given to the log file when it is saved so that each user has a unique log file that is overwritten each time he/she runs the report. 

 

So, if Jon Holcomb submits the stored process to generate a report, can I use his USER ID (jon.e.holcomb) in the logic of the stored process?

 

holcoje_0-1721668299816.png

 

 

1 REPLY 1
DeMer
Obsidian | Level 7

There should be some macro variables created when you run the stored process -

  https://documentation.sas.com/doc/en/itechcdc/9.4/stpug/p184mqqbi9w6qjn1q0619x19eg02.htm

Something like _METAUSER might have what you need.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 533 views
  • 0 likes
  • 2 in conversation