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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.