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! 🙂