BookmarkSubscribeRSS Feed
Sudhakar_A
Calcite | Level 5
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
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
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
Sudhakar_A
Calcite | Level 5
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
Cynthia_sas
SAS Super FREQ
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
Sudhakar_A
Calcite | Level 5
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 7403 views
  • 0 likes
  • 2 in conversation