SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
DavidPhillips2
Rhodochrosite | Level 12

I have a long-stored process with a macro loop.  It looks like my Oracle connection form my Libname stays open a little over an hour.  Then my Oracle connection closes and the stored process slowly errors out.  Should I remake my libname connection after a set amount of time?  Is there a way to do this?

3 REPLIES 3
AhmedAl_Attar
Ammonite | Level 13

If your Oracle Library definition stored in the SAS Metadata Server, then you can try the LIBNAME Statement for the Metadata Engine.

 

LIBNAME <LibRef> META library="<Library Description>" metaout=data; 

For more details, check this paper https://support.sas.com/documentation/onlinedoc/guide/EG43MetaLibraries.pdf

 

Hope this helps,

Ahmed

DavidPhillips2
Rhodochrosite | Level 12

I'll try this.  First I"m looking at loading everything into memory first from Oracle into SAS before I start lopping in my stored process.  I'm guessing the idle time error that I'm receiving is not about the length of the query but the amount of time between a SAS call and an Oracle call.

AhmedAl_Attar
Ammonite | Level 13

Depending on how big the oracle data, loading it into SAS may not be the best option, but you know better.

in all cases, I would recommend you explore the information listed in this SGF paper 

- SAS-Oracle Options and Efficiency: What You Don’t Know Can Hurt You

 

You can find a lot more papers on this subject by visiting this link https://lexjansen.com/search/searchresults.php?q=Oracle

 

Hope this helps,

Ahmed

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1167 views
  • 1 like
  • 2 in conversation