- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you remove SAS from the process, and submit that command on a command line, does it work?
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
MPRINT(COPY_MOD_STEP): x "notepad.exe uja011.sas";
MPRINT(COPY_MOD_STEP): run;
MLOGIC(COPY_MOD_STEP): Ending execution.
The operation was canceled by the user.
172 x "notepad.exe uja011.sas"
172! ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Okay, and what about my other questions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content