BookmarkSubscribeRSS Feed
ksocki
Fluorite | Level 6
Hello! Is it possible to disassociate a libref that was preassigned? And do it in a stored process?
Cheers!
6 REPLIES 6
LinusH
Tourmaline | Level 20

I haven't found any specific information about this, but it would make sense if this is possible only in session scope.

Have you tried?

And...why?

Data never sleeps
ksocki
Fluorite | Level 6

Hello LinusH,

we have limited oracle sessions count in one of the environments, thus we need to reduce the number of oracle librefs. This is why we try to disassociate some of them.

What do you mean by session scope? I know that it's possible to assign and clear the libname in a single session, but we have the librefs preassigned, unfortuntelly.

Regards!

yabwon
Onyx | Level 15

Won't just this:

libname LIB clear;

in autoexec in EG do the thing?

 

In SAS EG project tree add a program named "autoexec" and insert that line there.

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



ksocki
Fluorite | Level 6

Thanks yabwon!

We haven't tried this but wouldn't it be the same as "libname x clear" in stp code?

Still it's worth a shot 😉 I'll get back.

ksocki
Fluorite | Level 6

Fail 😞

The warning is the same as in the open code: "libref was not declared in this scope"

Regards! 🙂

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!

Discussion stats
  • 6 replies
  • 745 views
  • 1 like
  • 3 in conversation