09-19-2017 09:14 PM
I would like to know if there is a way to find out if the program or macro is currently used by any other user.
There is a macro with the name macro1.sas. It is currently opened for edititing in a Sas studio or Sas EG. How to find out that macro1.sas is opened for edititng. Please suggest a programmatic way to do this. I am assuming there might a procedure or macro that helps me achieve this.
Thanks for your help!
09-20-2017 01:21 AM - edited 09-20-2017 01:23 AM
EG does not lock program files, so any number of users can open them without anybody knowing.
09-20-2017 01:38 AM
I understand EG doesn't lock. But my requirement is to know if the program is open for editing by any other user. I want to know this programmatically.
09-20-2017 02:17 AM
"without anybody knowing" answers your question.
Since files are not marked or locked by EG, there is no way.
If you want to keep track of versions, this may interest you however:
09-20-2017 11:20 AM
09-21-2017 09:35 AM
No. I just need to find out if a program is opened by other user in Sas Studio or Sas Eg. I know when you open a program in Sas studio, you can see ~ before the program.
As @ChrisNZ already mentioned: "Since files are not marked or locked by EG, there is no way."
Program-files are simple text files, that can be viewed and edited by any text editor.
Please explain why you need to know if a program is opened by other users?
09-22-2017 10:43 AM
I am not using version* control mechanism.
I think that's your answer though, if you want to know who's using a file and make sure changes are not overwriting each other you should be implementing a version control system. Git interfaces with SAS.
09-25-2017 09:23 AM
Yes, you may be "surprised to know", but you now do know. Basically it just says that the task you want is handled by special purpose software (version control) that handles "content management" of all sorts of files, not just sas programs.
So how about helping the rest of the community by marking this question as solved? If, contrary to the responses of very experienced participants in this topic, you learn of a way to solve this entirely within sas, then edit this topic with that solution.