Hi there,
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.
For Example:
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!
Regards,
Ajay
EG does not lock program files, so any number of users can open them without anybody knowing.
Thanks Chris!
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.
Thanks 🙂
"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:
http://support.sas.com/resources/papers/proceedings14/SAS179-2014.pdf
Are you using a version control system where someone has to check out their code to edit it?
@ajaybetham wrote:
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?
No, I am not using error control mechanism.
@ajaybetham wrote:
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.
You didn't get the answer you want, but you got a correct answer. How about marking this topic as solved?
I am surprised to know that there is no way to know the files being edited in Sas.
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.