12-17-2014 02:10 PM
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.
12-17-2014 02:41 PM
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.
12-18-2014 08:32 AM
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"!
12-18-2014 09:56 AM
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.
12-18-2014 10:11 AM
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.
12-18-2014 10:31 AM
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.
12-18-2014 10:42 AM
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.
12-18-2014 02:07 PM
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.