<?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: Dataflux Conditional Expression with ODBC connection in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Dataflux-Conditional-Expression-with-ODBC-connection/m-p/638244#M19101</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;I could try to write the code for you, but I doubt it will work directly as I won't be able to test it with your RULES table.&lt;BR /&gt;As an example the following code lets you get a list of tables in a particular database.&lt;BR /&gt;// Set Expression node to "Generate row when no parent is specified" to true&lt;BR /&gt;//Pre Expression&lt;BR /&gt;string DSN&lt;BR /&gt;DSN="DataFlux Sample"&lt;BR /&gt;string connectStr&lt;BR /&gt;//Preparing the connection string&lt;BR /&gt;connectStr = "DSN=" &amp;amp; DSN&lt;BR /&gt;DBConnection dbConn&lt;BR /&gt;dbConn = dbConnect( connectStr )&lt;BR /&gt;&lt;BR /&gt;string tablename&lt;BR /&gt;string datapath&lt;BR /&gt;string tcatalog&lt;BR /&gt;string tabletype&lt;BR /&gt;DBCursor cursTables&lt;BR /&gt;&lt;BR /&gt;//Retrieve table information in a cursor&lt;BR /&gt;cursTables = dbConn.tablelist();&lt;BR /&gt;//Iterate through the cursor&lt;BR /&gt;while( cursTables.next() )&lt;BR /&gt;begin&lt;BR /&gt;datapath = cursTables.valuestring(0); tcatalog =&lt;BR /&gt;cursTables.valuestring(1); tablename = cursTables.valuestring(2);&lt;BR /&gt;tabletype = cursTables.valuestring(3)&lt;BR /&gt;pushrow()&lt;BR /&gt;end&lt;BR /&gt;cursTables.release();&lt;BR /&gt;&lt;BR /&gt;//Expression&lt;BR /&gt;seteof()&lt;BR /&gt;return false</description>
    <pubDate>Wed, 08 Apr 2020 07:44:14 GMT</pubDate>
    <dc:creator>VincentRejany</dc:creator>
    <dc:date>2020-04-08T07:44:14Z</dc:date>
    <item>
      <title>Dataflux Conditional Expression with ODBC connection</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Dataflux-Conditional-Expression-with-ODBC-connection/m-p/637856#M19087</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new in Dataflux and I am trying to figure out how to do a conditional logic with an ODBC connection using multiple columns from the external data source. There are multiple columns in the RULES table and I need to use them in a conditional logic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static dbconnection db1
static dbstatement stmt1
dbcursor curs1
boolean retval1

 if isnull(db1) then
   db1 =  dbconnect('DSN=MS Access Database;DFXTYPE=ODBC')
if isnull(stmt1) then
begin
   stmt1 = db1.prepare("SELECT * FROM "RULES" WHERE ISALPHA = ?")
   stmt1.setparaminfo(0, 'string', 5)
end

 
&amp;lt;&amp;lt;missing comparison&amp;gt;&amp;gt;

 
 
if retval1 == true then
return true
else
return false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 14:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Dataflux-Conditional-Expression-with-ODBC-connection/m-p/637856#M19087</guid>
      <dc:creator>Vinz867</dc:creator>
      <dc:date>2020-04-06T14:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dataflux Conditional Expression with ODBC connection</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Dataflux-Conditional-Expression-with-ODBC-connection/m-p/638244#M19101</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I could try to write the code for you, but I doubt it will work directly as I won't be able to test it with your RULES table.&lt;BR /&gt;As an example the following code lets you get a list of tables in a particular database.&lt;BR /&gt;// Set Expression node to "Generate row when no parent is specified" to true&lt;BR /&gt;//Pre Expression&lt;BR /&gt;string DSN&lt;BR /&gt;DSN="DataFlux Sample"&lt;BR /&gt;string connectStr&lt;BR /&gt;//Preparing the connection string&lt;BR /&gt;connectStr = "DSN=" &amp;amp; DSN&lt;BR /&gt;DBConnection dbConn&lt;BR /&gt;dbConn = dbConnect( connectStr )&lt;BR /&gt;&lt;BR /&gt;string tablename&lt;BR /&gt;string datapath&lt;BR /&gt;string tcatalog&lt;BR /&gt;string tabletype&lt;BR /&gt;DBCursor cursTables&lt;BR /&gt;&lt;BR /&gt;//Retrieve table information in a cursor&lt;BR /&gt;cursTables = dbConn.tablelist();&lt;BR /&gt;//Iterate through the cursor&lt;BR /&gt;while( cursTables.next() )&lt;BR /&gt;begin&lt;BR /&gt;datapath = cursTables.valuestring(0); tcatalog =&lt;BR /&gt;cursTables.valuestring(1); tablename = cursTables.valuestring(2);&lt;BR /&gt;tabletype = cursTables.valuestring(3)&lt;BR /&gt;pushrow()&lt;BR /&gt;end&lt;BR /&gt;cursTables.release();&lt;BR /&gt;&lt;BR /&gt;//Expression&lt;BR /&gt;seteof()&lt;BR /&gt;return false</description>
      <pubDate>Wed, 08 Apr 2020 07:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Dataflux-Conditional-Expression-with-ODBC-connection/m-p/638244#M19101</guid>
      <dc:creator>VincentRejany</dc:creator>
      <dc:date>2020-04-08T07:44:14Z</dc:date>
    </item>
  </channel>
</rss>

