DATA Step, Macro, Functions and more

code to implement row level security to data set using enterprise guide

Reply
Contributor
Posts: 70

code to implement row level security to data set using enterprise guide

Need a code to implement the row level security to a dataset in enterprise guide.

please also let me know the what columns should the excel contain with the condition.

 

Thanks

Super User
Super User
Posts: 9,840

Re: code to implement row level security to data set using enterprise guide

This has been asked many times before, for instance:

https://communities.sas.com/t5/SAS-Enterprise-Guide/Row-Level-Locking/td-p/74725

 

This; "please also let me know the what columns should the excel contain with the condition." makes no sense at all?

 

Contributor
Posts: 70

Re: code to implement row level security to data set using enterprise guide

Hi this is not what i am looking for as i am not looking for data lock to dataset.. i am looking for row level security where the specified user can access only the data through the given condition as which is managed in VA .
the same way using the code. where you have to pass the condition for users with their user id using the excel in enterprise guide.
Super User
Posts: 5,917

Re: code to implement row level security to data set using enterprise guide

Perhaps a bit egocentric to promote my own post, but I think it'll give you some starting point in your row level access journey:

https://communities.sas.com/t5/SAS-Communities-Library/Enforce-Row-Level-Access/ta-p/223870

Data never sleeps
PROC Star
Posts: 275

Re: code to implement row level security to data set using enterprise guide

I would make a view containing a subset of data, and then use standard security to give users access to the view instead of the original table. Only problem is, SAS does not do that (yet). In SAS you have to have read access to the table in order to use the view.

 

So my suggestion is that you move your data to a database system that has that kind of built-in row-level security, e.g. SQL Server. Of course, there may be an additional cost here, if you do not already have a SAS/Access license for the database you decide to use (the databases, e.g. the Express Edition of SQL Server, you can often get for free, on the other hand).

 

The alternative could be to encrypt and password-protect the table, and hide the password in a view declaration (Data step views compiled with the SOURCE=NOSAVE option, for instance, will not let the user see the underlying code), e.g.:

data user1/view=user1(source=nosave);
  set mydata(where=(country='SWEDEN') read=mysecretpassword);
run;  

which will give users with access to the USER1 view to view the Swedish records, but not the others, unless they know the secret password.

 

Ask a Question
Discussion stats
  • 4 replies
  • 203 views
  • 0 likes
  • 4 in conversation