I am running a program that generates a big log while running, so I decided to use the 'PROC PRINTTO LOG.' However, at the end of the run,
I want to delete this file after checking for errors before rerunning. Unfortunately, everything is going fine, but I cannot delete the log file while the program opens in sas9.4. Is there an option I can delete even if the program is available? (it looks like I need an option like 'Libname xx clear;)
This is the pop message (like any other files open at some place while deleting it)
" the action cannot be completed because the file is open in sas 9.4"
You need to close the file after you have created it. You do this via the SAS command
proc printto; run;
before you try to delete it.
Alternatively, don't delete it but tell PROC PRINTTO to just start a new file the next time you run the program.
proc printto new log= ... ;
You need to close the file after you have created it. You do this via the SAS command
proc printto; run;
before you try to delete it.
Alternatively, don't delete it but tell PROC PRINTTO to just start a new file the next time you run the program.
proc printto new log= ... ;
It worked Thank you very much for your help.
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.