BookmarkSubscribeRSS Feed
deleted_user
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?

Regards,
João
3 REPLIES 3
deleted_user
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.

Regards
Cynthia_sas
SAS Super FREQ
Hi:
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):
[pre]

%if &_METAPERSON = Tom %then %do;
%invoke_macro_code_for_OK;
run;
%end;
%else %if &_METAPERSON eq Jack %then %do;
%put You cannot handle this data. Try a different stored process.;
%end;
[/pre]

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.

cynthia

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
  • 3 replies
  • 917 views
  • 0 likes
  • 3 in conversation