<?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: Testing teradata connection or any server connection in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582496#M165688</link>
    <description>&lt;P&gt;How are you connecting to the server?&lt;/P&gt;
&lt;P&gt;The LIBNAME statement will set the macro varaible SYSLIBRC which you can then check.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname td teradata ..... ;
%if (&amp;amp;syslibrc) %then %do;
  %put ERROR: Could not connect to Teradata ;
%end;
%else %do;
  ... run extract code ...
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 20 Aug 2019 17:23:03 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-08-20T17:23:03Z</dc:date>
    <item>
      <title>Testing teradata connection or any server connection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582490#M165684</link>
      <description>&lt;P&gt;I am trying to&amp;nbsp;extract some data from Teradata but before executing code I would like to test server connection.&lt;/P&gt;
&lt;P&gt;I want to execute code only when server is up.&lt;/P&gt;
&lt;P&gt;Is there any SAS statement/function&amp;nbsp;that can be used to test server connection in batch mode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 16:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582490#M165684</guid>
      <dc:creator>nbonda</dc:creator>
      <dc:date>2019-08-20T16:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Testing teradata connection or any server connection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582496#M165688</link>
      <description>&lt;P&gt;How are you connecting to the server?&lt;/P&gt;
&lt;P&gt;The LIBNAME statement will set the macro varaible SYSLIBRC which you can then check.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname td teradata ..... ;
%if (&amp;amp;syslibrc) %then %do;
  %put ERROR: Could not connect to Teradata ;
%end;
%else %do;
  ... run extract code ...
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Aug 2019 17:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582496#M165688</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-20T17:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Testing teradata connection or any server connection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582502#M165689</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
    
     CONNECT TO TERADATA(DATABASE=&amp;lt;dbname&amp;gt;  USER=&amp;lt;user&amp;gt; PASSWORD=&amp;lt;pwd&amp;gt;);

     CREATE TABLE temp AS
     SELECT * FROM CONNECTION TO TERADATA
     (SELECT * from &amp;lt;table_name&amp;gt; 
       sample 0
) ;
        DISCONNECT FROM TERADATA;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try this if you are using SQL Pass through to teradata&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 17:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Testing-teradata-connection-or-any-server-connection/m-p/582502#M165689</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2019-08-20T17:45:34Z</dc:date>
    </item>
  </channel>
</rss>

