BookmarkSubscribeRSS Feed
SASDump
Calcite | Level 5
I know that there are method to protect record in dataset by lib, rec and mem level. I wonder if I can protect particular column in the dataset from being edited?

Some trick i have played with:
1. create IC on dataset A with dataset B reference on A primary key, so that dataset A's primary cannot be edited. (can i customerised the error message when editing dataset A's primary key? i only can customerised the message when editing the foreign key on B)
2. create a dummy column same as the required to be protected column ccc, then create ic on check the value where ccc = dummy. (can i hide the dummy by code in dataset ? or can i check the value on a different dataset ?)

I know the tricks are silly, but that what i can only think of, please shed me some light please!
3 REPLIES 3
TomKari
Onyx | Level 15
A very common one is to define a view on the base table. Only give access to the view to your users. Leave out any columns you don't want them to see, make the permissions on the view read-only.

I'm not sure you could have some columns updatable and others read-only.
SASDump
Calcite | Level 5
thanks for the reply TomKari, but i has to clarify that the read-only i want to protect is those reference column and i have already defined a view based on the original table. I already "Leave out any columns you don't want them to see", so..thanks for your reply anyway, anyone else please shed me some light....
LinusH
Tourmaline | Level 20
A dull (?) answer is to store your data in a database that supports column level security.
I think most commercial databases do (including SAS SPD Server).

/Linus
Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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