10-08-2014 05:40 PM
Hello Friends, I need some help plz....
I am using SAS 9.1 and have set up one automatic .bat file which is cleaning all sas datasets with .sas7bdat extension every wk. I am using below command...what is happening is sas datasets get deleted but after some process run on wkend...even year old sas datasets get back here....and i have no idea how we are getting back those datasets automatically..... even we don't have any back up process in place which would put all those old sas datasets back....this is "sasuser" library path...where user's default sas datasets get stored....
DEL /Q C:\xyz_directory_path\9.1\*.sas7bdat
FOR /D %%i in ("C:\xyz_directory_path\9.1\*.sas7bdat") do rd /Q "%%i"
10-08-2014 06:05 PM
SASUSER does not hold "default" datasets, it holds things related to the user. If some of the files are not there when SAS starts it will make them, such as SASUSER.Profile, which has things like the SAS window color and location information, using default information stored in SASHelp.
If you are putting work related files in that library I would suggest using another permanent library or two and cleaning them. Or since those sets get recreated when SAS starts just ignore that they reappear.
10-10-2014 09:55 AM
That cleanup using proc datasets should be done as guideline by the users theirself.
Tech support guys use the utilities SAS is delivering:
= SAS(R) 9.2 Companion for Windows, Second Edition (cleanup handler)
= SAS(R) 9.4 Companion for Windows, Third Edition (cleanwork like Unix)
No need to invent a own Windows invented tool. http://support.sas.com/documentation/cdl/en/hostwin/67279/HTML/default/viewer.htm#p03ktuo5yud2usn1qa...