BookmarkSubscribeRSS Feed
sas_9
Obsidian | Level 7

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....

any suggestion...???

c:

cd \

DEL /Q C:\xyz_directory_path\9.1\*.sas7bdat

FOR /D %%i in ("C:\xyz_directory_path\9.1\*.sas7bdat") do rd /Q "%%i"

exit

5 REPLIES 5
ballardw
Super User

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.

sas_9
Obsidian | Level 7

i am not sure what set up is but seems like EG is storing all default datasets in it and same in work folder too...

jakarman
Barite | Level 11

SAS Eg is just like a terminal application. It is an interface.

Your sas-session setup and configuration is not as should be.    

---->-- ja karman --<-----
Ksharp
Super User

No need to write BAT file to delete these SAS datasets .

proc datasets library=WORK KILL ;

quit;

jakarman
Barite | Level 11

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...

---->-- ja karman --<-----

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2937 views
  • 6 likes
  • 4 in conversation