The SAS Output Delivery System and reporting techniques

Unable to clear the library because it is still in use

Reply
Contributor
Posts: 60

Unable to clear the library because it is still in use

Hi all,

I have created a new template stored and using it with the following lines

Libname macrolib "F:\sudhakar";
ods path macrolib.rptstyle (UPDATE)
sashelp.tmplmst(READ);

If i execute the above line once again for the second program i am getting the error
ERROR: Unable to clear or reassign the library macrolib because it is still in use ;
ERROR: Error in libname statement

I have checked with SAS Links which gives the work around in the below link
"http://support.sas.com/kb/1/525.html"

but it is not solved yet for me


Thanks
Sudhakar
Help me to solve this
SAS Super FREQ
Posts: 8,868

Re: Unable to clear the library because it is still in use

Posted in reply to Sudhakar_A
Hi:
If the ODS PATH RESET does not work for you, as described in the Tech Support Note, then you might consider contacting SAS Tech Support. There may be other issues with your code. I do notice that your libref is called "macrolib" -- it may be possible that if you are putting templates and autocall macros in the same location that access and/or updating of the macro code is preventing the reassignment of the library. But that's only speculation on my part. I generally keep my macro programs separate from my template store.

Again, Tech Support can look at all your code and your libraries and help you figure out the best solution.

cynthia
Contributor
Posts: 60

Re: Unable to clear the library because it is still in use

Posted in reply to Sudhakar_A
Hi,

Thank you very much

Yes ur right i am using Macro and template in one location now i removed the template, even though its is giving the same error i have stored catalog macro in that location its is saying the same error

What can i do
SAS Super FREQ
Posts: 8,868

Re: Unable to clear the library because it is still in use

Posted in reply to Sudhakar_A
I highly recommend that you contact Tech Support. If the ODS PATH RESET didn't work and if separating the templates from the macros was not the issue, then Tech Support can investigate in more depth. You can open a track by following the instructions at this link:
http://support.sas.com/ctx/supportform/createForm

cynthia
Contributor
Posts: 60

Re: Unable to clear the library because it is still in use

Posted in reply to Sudhakar_A
I have already posted the problem to SAS.

I found the cause for that and i made one work around.

Cause :
I am doing the initializing of the ods path and macro path once in the setup file.
and calling this setup program in all the program because of that it is giving error.

Work around:
In Setup file i have checked the existence of library before libname statement.

Now it is working fine ..

Thanks for the effort and suggestions

Sudhakar
Ask a Question
Discussion stats
  • 4 replies
  • 2077 views
  • 0 likes
  • 2 in conversation