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
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?
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
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.