BookmarkSubscribeRSS Feed
ykk
Obsidian | Level 7 ykk
Obsidian | Level 7

I am developing a EG template for a project where in one of need is to allow the users to update a sas data set by opening it and we will be doing some validations on the updates done.Data set on which the user is doing updates has several columns and I don't want the user to be able to edit all the columns.I want to make some column readonly.

do we have any options in sas to achieve that.Can you please let me know of such options.

8 REPLIES 8
LinusH
Tourmaline | Level 20

First, I don't consider EG as an end user tool for updating data. The only exceptions could be system administrators and other situations for trusted users only.

Second, in Base SAS or in SAS metadata, there is no column level access control. It could be simulated using views, but this will not work for update.

So as a general advice would be to either develop a data entry application that could handle column level security, or use a data store that supports this kind of security, which includes SAS/SPD Server and many 3rd party RDBMS.

Data never sleeps
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Completely agree LinusH, have spent many hours working out a good way of getting data into SAS.  My opinion, RDBMS is probably most straight-forward as its built for that kind of thing and with ODBC connection access from SAS is real easy.  Datagrids + app can also be an option.  Please though, OP, don't immediately think "I know, what about Excel"!

Ksharp
Super User

You can make a view to hide these read-only variable .

normarc
Calcite | Level 5

One option that might work, would be to split the table into two tables.  Pick a primary key or unique column to use for joining both tables using SQL.   Put the columns you don't want edited into the "master" table and the columns you will allow to be edited into the "slave" table.   Set the file ( of the Master table ) as read only. 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

The problem therein though would be how to display it to the user.  You would need to join the tables and show one table, which then goes back to the editable.  You may also want to consider and audit trail, Edit Checks etc.

pwe
Fluorite | Level 6 pwe
Fluorite | Level 6

Unlike LinusH, I think EG is a great tool for updating data. A custom-add in task would be a great solution offering both a good interface and the ability to create good editing rules.

Astounding
PROC Star

As you've been told, there are no simple options.  Here is one strategy that might work.

Create an EG process flow that takes these steps:

(1) Copy the table

(2) Let the user edit the copy (provide any messages you would like about what can be edited and what can't)

(3) Drop/keep variables from the edited copy

(4) Use the kept variables from the edited copy to update the original table

There are complications if the user edits by adding/deleting rows, but all of this can be overcome.

Good luck.

jakarman
Barite | Level 11

Why are your trying to do something as building a transactional approach that is common in OLTP systems using a RDBMS supporting full ACID?

I mentioned some abbrevations you are possible not aware off. This is the difference between an analytics environment  and a classic IT (cobol waterfall) approach.

Depending on your needs there could be some options. However do not expect SAS is a competitor of LAMP.  

---->-- ja karman --<-----

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 8 replies
  • 1779 views
  • 1 like
  • 8 in conversation