BookmarkSubscribeRSS Feed
Not applicable
Hi People,

I have a Stored Processes to calculate some metrics to return in a Report no Web Report Studio, but that report is visible to every user.

What I want is how can I use a filter to create restrictions by user. In Information Maps I use a prefilter and and the option "Derive identity values (for row level permissions) and SAS.Userid".

I have a table with the users and that table is connected to the factual by the keys.

Can anyone help me?

Not applicable
Good Documentation

but it did not help :s

In Information Maps i can do that, in Code i don't know how to do.

In code, you could try to run the SP based on the automatic &_METAPERSON variable. Using SAS Macro programming techniques, you could code your stored process like this (assumes your "OK" code is packaged in an autocall macro program):

%if &_METAPERSON = Tom %then %do;
%else %if &_METAPERSON eq Jack %then %do;
%put You cannot handle this data. Try a different stored process.;

I wouldn't recommend this approach. For one thing, the %PUT will go to the LOG and users don't always have the LOG option turned on. I'm not even sure the log option is available in WRS. But, I still wouldn't recommend this approach -- if users change or leave, then you have to keep changing the stored process. And not all client applications set or use &_METAPERSON. And, coding this yourself, inside the SP, bypasses one of the major features of the platform.

The Enterprise Intelligence Platform has security -- that's one of the big features of having the metadata. I'd define a special group of users and then ONLY give members of that group authorization to run the SP. If users change or leave, you just have to change the membership in the group -- the SP is unchanged. You could even populate the data for the SP from an Information Map before the analysis is run. If you can put an authorization-based prefilter on the Information Map that populates the SP with data, you might not need the extra security on the SP.

Your best bet for help with this task may be to contact Tech Support. They can take a look at your SP and the analysis you want to surface conditionally and make specific suggestions based on what it is you need to do.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3 in conversation