Help using Base SAS procedures

How to lock the SAS code ??

Reply
Contributor
Posts: 32

How to lock the SAS code ??

I know how to write protect the sas datasets,

but is there any way or procedure to lock the sas code?

Thanks in advance ...
Super Contributor
Posts: 356

Re: How to lock the SAS code ??

SAS code is only text, so you can use the OS security permissions to control ie deny Read and/or write.
Contributor
Posts: 32

Re: How to lock the SAS code ??

Posted in reply to twocanbazza
I tried doing that but any one can change the settings again. Thanks anyway..
Trusted Advisor
Posts: 2,116

Re: How to lock the SAS code ??

"I tried doing that but any one can change the settings again."

That statement is not uniformly true. In both Unix and Windows, there are settings that provide different users with different roles and can implement the source code protection.
Frequent Contributor
Posts: 134

Re: How to lock the SAS code ??

Posted in reply to twocanbazza

Any suggestions on how to use windows file locking to lock SAS programs?

We have two people working on a large SAS program (windows workstations accessing files on a server share). With Word documents and many other documents if one person opens the file the next person to try to open it gets a message saying it is already in use. Any way to have the SAS editor lock the file in a similar fashion?

Super User
Super User
Posts: 7,077

Re: How to lock the SAS code ??

Posted in reply to BruceBrad

Personally I find Word's habit of locking a file very annoying. 

Frequent Contributor
Posts: 139

Re: How to lock the SAS code ??

you could use a versioning control system like subversion or cvs. if your problem is people changing your code.
Regular Contributor
Posts: 171

Re: How to lock the SAS code ??

You could save the program as a stored compiled macro using the STORE and SECURE options. You would need to somehow save a separate copy of the source code in case you need to make future modifications or you need to copy the source program across different releases of SAS.
Super User
Posts: 3,260

Re: How to lock the SAS code ??

You can also store SAS code in a SAS catalog SOURCE entry and password-protect it there. A simple %INCLUDE statement can be used read the code from the catalog and submit it.
Contributor
Posts: 32

Re: How to lock the SAS code ??

Can you send me the link or SUGi paper ??

I dont see any password protection option?
N/A
Posts: 0

Re: How to lock the SAS code ??

Contributor
Posts: 32

Re: How to lock the SAS code ??

Posted in reply to deleted_user
Document says about the locking of SAS dataset, but I need to lock the SAS program code file.

I use proc datasets to read, write access and it is very helpful.

Special thank to Raveena,SASKiwi ,polingjw ,Doc@Duke ,darrylovia ,twocanbazza .

I learned many things from you while I am trying to find the solution for my question..

I appreciate your help...
Super User
Posts: 10,046

Re: How to lock the SAS code ??

Hi.
A little trick is to change the file suffix, for example change class.sas to win.dll,
then move the win.dll into c:\windows\system32\ ,
then someone will treat it as windows system file to neglect it.


After you can use notepad to open it, but only you know it is txt file.



Ksharp
Super User
Super User
Posts: 7,077

Re: How to lock the SAS code ??

That page definitely talks about locking individual entries in a catalog.

But you are probably better off implementing a change control process instead.  You could use software like subversion or even just RCS.   Or you could setup a process were changes are saved to either a different directory or different file name and changes to the production file is only made in a coordinated fashion.

Super User
Posts: 3,260

Re: How to lock the SAS code ??

Tom's suggestion of using a change control process is a good one. We use TFS in our organisation and it allows you to lock a program if someone else has checked it out for changing. It also allows more than one person to work on the same program simultaneously and then merge the changes when checking them back in.

Ask a Question
Discussion stats
  • 14 replies
  • 1330 views
  • 0 likes
  • 10 in conversation