DATA Step, Macro, Functions and more

how to delete a library permanently

Reply
Contributor
Posts: 45

how to delete a library permanently

how to delete a sas library permanently
Super Contributor
Super Contributor
Posts: 3,174

Re: how to delete a library permanently

A straightforward SAS support SEARCH request (or Google advanced) reveals several relevant references.

Scott Barry
SBBWorks, Inc.

Google advanced search argument, this topic / post:
delete sas library site:sas.com
Contributor
Posts: 45

Re: how to delete a library permanently

Thanks for your kind information .But I go through google i couldn't find this.

So please help me on this topic .

How we can delete a sas dataset permanently.
Super Contributor
Super Contributor
Posts: 365

Re: how to delete a library permanently

Hello Arpit,

Highlight a dataset name in a SAS library and press Delete or do the same thing in Windows folder (;-)

Sincerely,
SPR
Regular Contributor
Posts: 171

Re: how to delete a library permanently

If you want to delete all the members in a sas library, use
[pre]
proc datasets lib= kill;
[/pre]
Contributor
Posts: 45

Re: how to delete a library permanently

Dear Poligjw,

It delete only content of library .

I want to know how to delete complit library

Thanks for your kind information.
Valued Guide
Posts: 2,175

Re: how to delete a library permanently

have you tried
LIBNAME lib ;
Super Contributor
Super Contributor
Posts: 3,174

Re: how to delete a library permanently

The technical method / process will depend on your SAS OS environment.

So, for Windows, consider using PROC DATASETS with KILL to clear the SAS library of all members followed by using the FDELETE function (either in a DATA step or with SYSFUNC using SAS macro language) to remove/delete an empty directory (or external file reference).

Scott Barry
SBBWorks, Inc.
Contributor
Posts: 45

Re: how to delete a library permanently

Dear Sbb,

Thanks for your information Could you explain .

Regards,
Arpit
Contributor
Posts: 45

Re: how to delete a library permanently

Yes i try with this statement but it delete the file of library
Valued Guide
Posts: 2,175

Re: how to delete a library permanently

sorry, I thought that was what you wanted..
Super Contributor
Super Contributor
Posts: 3,174

Re: how to delete a library permanently

Suggest the OP read the available SAS DOC and also consider the SAS support http://support.sas.com/ website resources -- consider the recommended search arguments provided in a prior post-reply.

Scott Barry
SBBWorks, Inc.
Trusted Advisor
Posts: 2,113

Re: how to delete a library permanently

'permanently' is subject to multiple interpretations. The search items that Scott provided can generally be used to delete a library 'reference' in a SAS programming environment.

In Unix and Windows, a library refers to a physical directory on disk. To "permanently" remove the directory and it's data requires a third party utility. For instance, "File Shredder" ( http://www.fileshredder.org/ ) will over-write the bits in Windows.

Doc Muhlbaier
Duke
Occasional Contributor
Posts: 19

Re: how to delete a library permanently

Hi Arpit,

You can delete a library which you have created using Libname statement.
The command is libname clear;
You can't delete SAS peramanent libraries like sasuser, sashelp, maps.

I hope this is what you want.

Regards,
Manoj Khandelwal
New Contributor
Posts: 2

Re: how to delete a library permanently

Yes, that's correct .You can use 

libname mylib clear;

 

mylib- is the library you like to delete.

the entire library with its contents will be deleted.

It is one of the house keeping practices .

 

Smiley Happy

 

Ask a Question
Discussion stats
  • 15 replies
  • 3110 views
  • 2 likes
  • 9 in conversation