I am using command
x "notepad.exe aaa.txt";
in SAS data step.
In win10 it ws working. In win11 it gives error
“The process cannot access the file because it is being used by another process
How to make it working
Occasionally I hafe found solution for my particular case. I was using command
x "notepad.exe uja011.sas";
for some reason exactly that format was working in previous version of windows
Now the following works
x "notepad uja011.sas";
So I don't know why , but it works and for time being it is enough for me to know the working format.
Thank you to all replying to my post.
If you remove SAS from the process, and submit that command on a command line, does it work?
What about the command:
notepad.exe aaa.txt
?
(Perhaps with a path to the text file, otherwise windows is probably assuming it's in the current directory, or some-such.
Basically I would try to get to the point where the exact same command works from command prompt, but doesn't work from SAS with the X statement.
Do you have the necessary maintenance level of sas for Windows 11 (9.4 TS1M7)?
What happens if you try to open the same file with a manually started Notepad while the SAS session is still running?
Is the file aaa.txt created through SAS code in the same session? If yes, post the complete log from the creation of the file up to the X statement.
Okay, and what about my other questions?
Occasionally I hafe found solution for my particular case. I was using command
x "notepad.exe uja011.sas";
for some reason exactly that format was working in previous version of windows
Now the following works
x "notepad uja011.sas";
So I don't know why , but it works and for time being it is enough for me to know the working format.
Thank you to all replying to my post.
Glad that it works for you now. May I suggest sparing a like for those having lent a helping hand? ... Just a thought to keep people motivated. 🙂
--fja
I suspect the difference is really that in the mean time you closed the other program than had the SAS file open. That is what your original error message was about. Perhaps you were trying to edit the program you were running?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: