<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: libname function not disconnecting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206497#M306548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as there is some TD processing going on you cannot break interrupt that.&lt;/P&gt;&lt;P&gt;What could be done is killing the Sas session that started that TD process completely with an OS cmd like kill pid.&lt;/P&gt;&lt;P&gt; That will signal the TD process also. Do not use the -9 option but let it gracefully ending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2015 06:47:05 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2015-06-26T06:47:05Z</dc:date>
    <item>
      <title>libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206490#M306541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a libname function as below and it is connecting &amp;amp; provides 0 return code. But the problem is, it is not disconnecting (i think), it leaves idle sessions on the teradata side. Just want to know what exactly this function does ? whether it connects &amp;amp; disconnects to/from teradata ? or Do i need to explicitly specify how to disconnect from teradata ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rc_libname = libname(teradata_libname, ,unix_engine&amp;nbsp;&amp;nbsp; , " server='&amp;amp;com_dbserver' schema='&amp;amp;com_db' user='"||trim(teradata_userid)||"' password='"||trim(teradata_password)||"'" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To add to that, we have a dsid function statements after rc_libname return code check... not sure if it impacts the teradata connection..&lt;/P&gt;&lt;P&gt;dsid=open(trim(teradata_libname)||"."||trim(teradata_table)||trim(teradata_where), "IS");&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;rc_close&amp;nbsp;&amp;nbsp;&amp;nbsp; = close(dsid);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 14:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206490#M306541</guid>
      <dc:creator>sasbeginner_us</dc:creator>
      <dc:date>2015-04-29T14:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206491#M306542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;The LIBNAME function assigns or deassigns a libref from a SAS library. When you use the LIBNAME function with two or more arguments, SAS attempts to assign the libref. When you use one argument, SAS attempts to deassign the libref. Return codes are generated depending on the value of the arguments that are used in the LIBNAME function and whether the libref is assigned."&lt;/P&gt;&lt;DIV class="details"&gt;&lt;DIV class="subTopic"&gt;&lt;DIV class="topicContent"&gt;&lt;DIV class="paragraph"&gt; &lt;/DIV&gt;&lt;DIV class="paragraph"&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P id="bookpage"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p1bq8nyxm7y1ygn1i4vyf82z68ls.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p1bq8nyxm7y1ygn1i4vyf82z68ls.htm"&gt;SAS(R) 9.3 Functions and CALL Routines: Reference&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 14:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206491#M306542</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-29T14:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206492#M306543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you... i will check this. Can you please explain me what dsid=open() does ? is it like a read/select statement but it wont establish a connection ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 15:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206492#M306543</guid>
      <dc:creator>sasbeginner_us</dc:creator>
      <dc:date>2015-04-29T15:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206493#M306544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n0q72zlfmfjplon1p3nprf85sdin.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n0q72zlfmfjplon1p3nprf85sdin.htm"&gt;SAS(R) 9.3 Functions and CALL Routines: Reference&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 17:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206493#M306544</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-29T17:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206494#M306545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your libname is starting a session. As I see a Teradata being mentioned pleas use shared connections. It is some special RDMS behaving a litrle bit different as other OLTP DBMS systems&lt;BR /&gt;The dsid open opening a table that is mire like a transaction at the Teradata site.&lt;/P&gt;&lt;P&gt;These are advanced&amp;nbsp; functions not for beginners when you are a beginner it more appropriate to use the more common easy statements of a beginners approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 19:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206494#M306545</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-04-29T19:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206495#M306546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 20:34:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206495#M306546</guid>
      <dc:creator>sasbeginner_us</dc:creator>
      <dc:date>2015-04-29T20:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206496#M306547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I know it is an advacned function but I am trying to put a fix to this existing code. The problem with the above stmt is that it is not disconnecting from teradata as this code loops till a certain time. I tried to use rc_libname = libname(teradata_libname); to disconnect but getting an error&lt;/P&gt;&lt;P&gt;"ERROR: Unable to clear or re-assign the library TERAlib_ because it is still in use.". Please assist me in this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 14:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206496#M306547</guid>
      <dc:creator>sasbeginner_us</dc:creator>
      <dc:date>2015-06-25T14:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206497#M306548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as there is some TD processing going on you cannot break interrupt that.&lt;/P&gt;&lt;P&gt;What could be done is killing the Sas session that started that TD process completely with an OS cmd like kill pid.&lt;/P&gt;&lt;P&gt; That will signal the TD process also. Do not use the -9 option but let it gracefully ending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 06:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206497#M306548</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-06-26T06:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: libname function not disconnecting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206498#M306549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your error message is telling the session has been made and connected. As you can view open tables with eguide that opening can be the lock on the libname&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 06:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-function-not-disconnecting/m-p/206498#M306549</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-06-26T06:49:42Z</dc:date>
    </item>
  </channel>
</rss>

