<?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: verify files are in folder- Dataflux in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/497542#M15494</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Are you able to know the file name or is there any green flag stating that the file is present and ready for being process?&lt;BR /&gt;&lt;BR /&gt;Vincent&lt;/P&gt;</description>
    <pubDate>Thu, 20 Sep 2018 19:43:01 GMT</pubDate>
    <dc:creator>VincentRejany</dc:creator>
    <dc:date>2018-09-20T19:43:01Z</dc:date>
    <item>
      <title>verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/496630#M15476</link>
      <description>&lt;P&gt;Using DataFlux. In standalone mode, meaning no other SAS environment is available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to make sure&amp;nbsp;there are files in a folder (name changes as the export date is appended to the filename)&lt;/P&gt;&lt;P&gt;before the Text File Import node is executed to prevent a "Error reading file" error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My plan was to put an expression in the Process Flow checking to make sure at least one file exists.&lt;/P&gt;&lt;P&gt;then use If node to branch to the import process for that set of files .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see in the expression user manual the fileexists function but nothing to allow passing dynamic names to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought about calling a batch file to return the DIR contents but cant seem to get the external node to work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 16:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/496630#M15476</guid>
      <dc:creator>Rcflyboyjr</dc:creator>
      <dc:date>2018-09-18T16:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/497542#M15494</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Are you able to know the file name or is there any green flag stating that the file is present and ready for being process?&lt;BR /&gt;&lt;BR /&gt;Vincent&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 19:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/497542#M15494</guid>
      <dc:creator>VincentRejany</dc:creator>
      <dc:date>2018-09-20T19:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/497871#M15503</link>
      <description>&lt;P&gt;The problem is the filenames are different each time we process.&lt;/P&gt;&lt;P&gt;I prefer the Text input node doesn't even get executed if there is no file in the folder .&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 15:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/497871#M15503</guid>
      <dc:creator>Rcflyboyjr</dc:creator>
      <dc:date>2018-09-21T15:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/498325#M15516</link>
      <description>&lt;P&gt;Ok, it still possible to read the content of the folder before starting your process. What would be the rules for identifying the file to read?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 09:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/498325#M15516</guid>
      <dc:creator>VincentRejany</dc:creator>
      <dc:date>2018-09-24T09:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/498424#M15521</link>
      <description>&lt;P&gt;Each week we get new files from one customer but once a month we get files from another customer. the files are currently in separate folders as I couldn't figure a way to only load cust_a files in TextNode A and cust_b in TextNode B&amp;nbsp; pointing to same folder .. SO thus separate folders. Back to main question.&amp;nbsp;&amp;nbsp;&amp;nbsp; on Week 1,2,3 there would only be files in one folder .. on week 4 we would have both sets of files.&amp;nbsp;&amp;nbsp;I preferred to have both processes started at once in one Process flow so the user only has one process to start.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When started it would&lt;/P&gt;&lt;P&gt;check that the input folder had files, if so branch to the actual import , cleanse and export .&lt;/P&gt;&lt;P&gt;if cust_b folder was empty it would branch to a complete section and wait for the other customer files to finish without erroring and stopping the process. BUT it should stop if there really was an error in one of the steps during load and cleanse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Think I might be able to do it with the other solution you provided on another question ( the listener demo )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 14:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/498424#M15521</guid>
      <dc:creator>Rcflyboyjr</dc:creator>
      <dc:date>2018-09-24T14:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/498467#M15522</link>
      <description>&lt;P&gt;Quite tough to provide you with the most consistent approach. However:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Path and file name can be built relying on macro variables&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Therefore if there is one file in your folder, it is possible to read the folder, get the file name and pass it to the text input&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If the format of the file does not change, you only have to pass the "PATH" and the text input node will read all the files in the folder applying the default structure.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You can also activate the FILENAME option for retrieving an additional column storing the name of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I can provide you with the file watcher logic, but you usually need a "green ligh" file (of 0ko) which will tell you that you can process the main file. If your main file is pretty big and is uploaded by a ftp or another process, a file watcher logic may start to process it as soon as it is being created. This is why a green light flag needs to be created when the full upload is completed, and must be the one you are looking at for triggering the process.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 16:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/498467#M15522</guid>
      <dc:creator>VincentRejany</dc:creator>
      <dc:date>2018-09-24T16:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: verify files are in folder- Dataflux</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/499049#M15532</link>
      <description>&lt;P&gt;Vincent,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for the details. this sounds like what I have so far. I do use the macro variables. I split all the files into separate folders based on structure and I do use just the path. I also use the FILENAME feature to propagate the name through the process. I think based on your description and the similarities I am probably at the best solution for what I have.&amp;nbsp; Since the files are large the header check process in the beginning IS slow as it has to read the entire file to strip out the header.&amp;nbsp;&amp;nbsp; I have requested python to be added to our environment so I think I will use that at the start of the process (external application node) to validate files exist for processing, verify header / column structure hasn't changed and then let the processes proceed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for taking the time to help and validate I'm on the right track.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 12:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/verify-files-are-in-folder-Dataflux/m-p/499049#M15532</guid>
      <dc:creator>Rcflyboyjr</dc:creator>
      <dc:date>2018-09-26T12:41:18Z</dc:date>
    </item>
  </channel>
</rss>

