<?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: PROC FEDSQL failed to initiate in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487434#M15201</link>
    <description>&lt;P&gt;I tried both approaches but proc fedsql just does not understand that I am passing in a macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;50         proc fedsql libs=(mbadsa);
51         SELECT
52         count(*)
53         FROM
54             MBADSA.DSA.EQUIFAX_DAS_SCR
55         where
56         MBA_run_dtm &amp;gt;  %tslit(&amp;amp;equifax_data_date);
ERROR: Error occurred building the Execution Tree.
ERROR: Error occurred initiating Filter.
ERROR: General error
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
57         quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Aug 2018 14:20:18 GMT</pubDate>
    <dc:creator>myelemes</dc:creator>
    <dc:date>2018-08-16T14:20:18Z</dc:date>
    <item>
      <title>PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487061#M15197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use PROC FEDSQL in SAS EG 7.1 but it is not working for me.&lt;/P&gt;&lt;P&gt;Does anyone know what is going on here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error messages I am seeing are as below:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc fedsql;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: Duplicate catalog name, SYSTEM, encountered in connection string, DSN or file DSN&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: PROC FEDSQL initialization failed.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select count(*) from cad.IP_ACCT_XREF_ME_V;&lt;/P&gt;&lt;P&gt;30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SAS code I am trying to run:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname cad2 sybaseiq dsn="&amp;amp;mbaDB" user="&amp;amp;officeUser" password="&amp;amp;officePwd";

proc fedsql;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;select count(*) from &lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;cad2&lt;/CODE&gt;.IP_ACCT_XREF_ME_V; &lt;BR /&gt;quit; &lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 16:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487061#M15197</guid>
      <dc:creator>myelemes</dc:creator>
      <dc:date>2018-08-15T16:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487065#M15198</link>
      <description>&lt;P&gt;This is caused by duplicate names among the native catalogs in the database you're accessing.&amp;nbsp; Plays up when you have multiple libname connections.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't find a SAS note but I did find a tech support track with some general advice.&amp;nbsp; I'll include that here, but if you need help making sense of it or have further issues, I suggest contacting Tech Support.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;If using Proc FedSQL or Proc DS2 when multiple Libname connections have been assigned to a database that supports native&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;catalogs, this error might occur.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp; ERROR: Duplicate catalog name, &amp;lt;name&amp;gt;, encountered in connection string, DSN or file DSN&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs46C92465"&gt;Native catalogs are automatically included in the connection and are not listed in the CATALOG= parameters. &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="cs1E61A8D4"&gt;To prevent the&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;errors you will need to specify all additional native catalog entries in the connection string and you will need to rename any that&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;produce errors. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;For example, the following Netezza server has two native catalogs named MODEL and SYSTEM. &amp;nbsp;An error will occur for each&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;duplicate catalog name found. &amp;nbsp;The error seen in this case was:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp; ERROR: Duplicate catalog name, MODEL, encountered in connection string, DSN or file DSN&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;The example below shows how the two catalog names are renamed to prevent the errors. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;To write the connection strings for all of the Libnames currently assigned to the SAS session to the SAS Log add this option&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;prior to the Proc DS2; or Proc FedSQL; statement:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp; options msglevel=i ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;The connection strings below illustrate how to rename the catalog names to prevent the errors caused by duplicate names.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs896B0E5B"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp; proc fedsql nolibs conn="DRIVER=FEDSQL;CONOPTS=(
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(DRIVER=NETEZZA;SERVER=daily;DATABASE=TEST;UID=net_test;PWD=*;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CATALOG=(X1=TEST;X1_MODEL=MODEL;X1_SYSTEM=SYSTEM;));
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(DRIVER=NETEZZA;SERVER=daily;DATABASE=system;UID=net_test;PWD=*;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CATALOG=(X2=TEST2;X2_MODEL=MODEL;X2_SYSTEM=SYSTEM;));)";
&amp;nbsp; &amp;nbsp;&amp;nbsp;select * from X1.customer;
&amp;nbsp; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="cs896B0E5B"&gt;&lt;SPAN class="cs4EA019A6"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs25D49F67"&gt;&lt;SPAN class="cs1E61A8D4"&gt;To turn prevent the connection strings from being written to the SAS Log add this option:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs25D49F67"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs2654AE3A"&gt;&lt;SPAN class="cs1E61A8D4"&gt;&amp;nbsp; options msglevel=n;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 15 Aug 2018 16:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487065#M15198</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-08-15T16:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487169#M15199</link>
      <description>&lt;P&gt;Thank you, I did try renaming the catalog, as suggested below, but a new error message kept saying that Catalog arguments are bad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fedsql  libs=(mba);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;WHen I used libs= option, it seems to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new issue is that I am having difficulty resolving Macro variables in Prod FedSQl;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fedsql  libs=(mba mbadsa);
SELECT count(*) from mba.dsa.equifax_das_scr where mba_run_dtm &amp;gt; &amp;amp;equifax_data_date;
quit;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Above gives me following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;37         proc fedsql  libs=(mba mbadsa);
NOTE: WARNING: [DataDirect][ODBC lib] Application's WCHAR type must be UTF16, because odbc driver's unicode type is UTF16
NOTE: WARNING: [DataDirect][ODBC lib] Application's WCHAR type must be UTF16, because odbc driver's unicode type is UTF16
38         SELECT count(*) from mba.dsa.equifax_das_scr where mba_run_dtm &amp;gt; &amp;amp;equifax_data_date;
ERROR: Error occurred building the Execution Tree.
ERROR: Error occurred initiating Filter.
ERROR: General error
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
39         quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I surround macro variable with double quotes, it resolves, but I don't need the double quotes to stay in the output... Also, sas thinks it is a column name...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;37         proc fedsql  libs=(mba mbadsa);
NOTE: WARNING: [DataDirect][ODBC lib] Application's WCHAR type must be UTF16, because odbc driver's unicode type is UTF16
NOTE: WARNING: [DataDirect][ODBC lib] Application's WCHAR type must be UTF16, because odbc driver's unicode type is UTF16
38         SELECT count(*) from mba.dsa.equifax_das_scr where mba_run_dtm &amp;gt; "&amp;amp;equifax_data_date";
ERROR: Column "'2018-05-11 19:51:09.744'" not found or cannot be accessed
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
39         quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 20:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487169#M15199</guid>
      <dc:creator>myelemes</dc:creator>
      <dc:date>2018-08-15T20:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487359#M15200</link>
      <description>&lt;P&gt;If you really need to compare against a literal value in single quotes, use the %TSLIT macro to resolve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let equifax_data_date= 2018-05-11 19:51:09.744;
%put %tslit(&amp;amp;equifax_data_date);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;'2018-05-11 19:51:09.744'&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So your case would be something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fedsql  libs=(mba mbadsa);
SELECT count(*) from mba.dsa.equifax_das_scr where mba_run_dtm &amp;gt; %tslit(&amp;amp;equifax_data_date);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I suspect your comparison needs to use a datetime value, in which case you might need to do something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
 x = "11May2018:19:51:09.744"dt;
 put x=;
 call symputx('equifax_data_date',x);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Aug 2018 12:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487359#M15200</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-08-16T12:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487434#M15201</link>
      <description>&lt;P&gt;I tried both approaches but proc fedsql just does not understand that I am passing in a macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;50         proc fedsql libs=(mbadsa);
51         SELECT
52         count(*)
53         FROM
54             MBADSA.DSA.EQUIFAX_DAS_SCR
55         where
56         MBA_run_dtm &amp;gt;  %tslit(&amp;amp;equifax_data_date);
ERROR: Error occurred building the Execution Tree.
ERROR: Error occurred initiating Filter.
ERROR: General error
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
57         quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 14:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487434#M15201</guid>
      <dc:creator>myelemes</dc:creator>
      <dc:date>2018-08-16T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487444#M15202</link>
      <description>&lt;P&gt;Can you show how you set the value of that macro variable, and %PUT the raw value so we can see what you're passing in?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 14:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487444#M15202</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-08-16T14:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487464#M15203</link>
      <description>&lt;P&gt;I receive a timestamp from a macro, I am pulling the latest timestamp value from a netezza table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL NOPRINT;
connect to netezza (&amp;amp;fwstAIConnect);
SELECT catt("'",(cat(put(datepart(lst_mba_run_dtm),yymmdd10.),' ',put(timepart(lst_mba_run_dtm),time12.3))),"'") INTO :&amp;amp;TIME_VALUE_VAR
FROM CONNECTION TO netezza
(
SELECT nvl(max(mba_run_dtm), '1900-01-01') AS lst_mba_run_dtm 
from &amp;amp;table_name
;
);
DISCONNECT FROM netezza;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;amp;equifax_data_date - is the date I receive frm the macro, please see below the %PUT statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;33 %let equifax_data_date = &amp;amp;equifax_data_date;
34 %put equifax_data_date .............................. &amp;amp;equifax_data_date;
equifax_data_date .............................. '2018-05-11 19:51:09.744'&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Aug 2018 15:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487464#M15203</guid>
      <dc:creator>myelemes</dc:creator>
      <dc:date>2018-08-16T15:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FEDSQL failed to initiate</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487543#M15204</link>
      <description>&lt;P&gt;It still seems like you're comparing a datetime value (mba_run_dtm), which is represented as a number, to a string literal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In database-specific SQL, that might work.&amp;nbsp; But I'm not sure that the literal value in FEDSQL is converted to a legit datetime for comparison.&amp;nbsp; It feels like you still need to do something to convert that&amp;nbsp;'2018-05-11 19:51:09.744' value to native value.&amp;nbsp; Maybe you need to add the TIMESTAMP keyword:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fedsql  libs=(mba mbadsa);
SELECT count(*) from mba.dsa.equifax_das_scr where 
 mba_run_dtm &amp;gt; TIMESTAMP&amp;amp;equifax_data_date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Not an expert on FEDQL here...but learning...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 18:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/PROC-FEDSQL-failed-to-initiate/m-p/487543#M15204</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-08-16T18:08:21Z</dc:date>
    </item>
  </channel>
</rss>

