<?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: Using conditional start to check date loaded on table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557579#M9999</link>
    <description>&lt;P&gt;Thanks. This is the solution we eventually settled for.&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2019 19:25:46 GMT</pubDate>
    <dc:creator>Soulbroda</dc:creator>
    <dc:date>2019-05-09T19:25:46Z</dc:date>
    <item>
      <title>Using conditional start to check date loaded on table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557492#M9993</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Current File Load Procedure&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Some files are automatically loaded during every single day's morning DDS load around 5AM.&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;VALID_FROM_DTTM&lt;/STRONG&gt; and &lt;STRONG&gt;VALID_TO_DTTM&lt;/STRONG&gt; are set to the DDS Business Date, which is the previous day's date. Eg: When loading on January 2, 2019, the Business Date shall be set to January 1, 2019.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;At roughly 3PM each business day, These files are copied by a computer operator to ftp location with the names &lt;STRONG&gt;MAJOR_FILE_&amp;lt;yyyy-MM-dd-hh-mm-ss&amp;gt;.csv&lt;/STRONG&gt; and &lt;STRONG&gt;MINOR_FILE_&amp;lt;yyyy-MM-dd-hh-mm-ss&amp;gt;.csv&lt;/STRONG&gt;.&lt;OL&gt;&lt;LI&gt;The file is copied with the last business day's data. So, for example, if January 2, 2024 was a Tuesday, we would receive data from December 29, 2023 (Friday - this is because January 1 is a holiday and weekends are not business days). If January 3, 2024 was a Wednesday, we would receive data for January 2, 2024.&lt;/LI&gt;&lt;LI&gt;In some circumstances, we may go several days without having files downloaded, in which case several files will be dropped at the same time for different days.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;These files are then manually renamed to &lt;STRONG&gt;X_EXF_MAJOR_FILE.csv&lt;/STRONG&gt; and &lt;STRONG&gt;X_EXF_MINOR_FILE.csv&lt;/STRONG&gt; and copied from the ftp location to a different location, where they overwrite the existing files&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Implications and Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;We load these data seven days a week but only receive files for 4-5 days per week. This means that we regularly load certain files more than once.&lt;/LI&gt;&lt;LI&gt;We use the previous day's date when loading these data, rather than the actual as-of date of the file. This means that we regularly load files with the incorrect date specified. See the chart below for an example &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;ProcessingDate&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Weekday&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Holiday?&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Actual Date of Data&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;VALID_FROM_DTTM&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;12/29/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Friday&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt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;12/28/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/01/2024&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01/03/2024&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Wednesday&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;No&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12/29/2023&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/02/2024&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01/04/2024&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Thursday&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;No&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/02/2024&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/03/2024&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This demonstrates that we load these data &lt;EM&gt;4 times&lt;/EM&gt; for December 28th, and each time it is loaded it is assigned a different invalid date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QUESTION:&lt;/STRONG&gt;&lt;/P&gt;Is there a way we can use a conditional start to ensure the date we are loading is the right one and not just loading any file?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 09 May 2019 15:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557492#M9993</guid>
      <dc:creator>Soulbroda</dc:creator>
      <dc:date>2019-05-09T15:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditional start to check date loaded on table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557511#M9996</link>
      <description>why not get the modified datetime for the file and compare it to what you already have loaded (store the mod dttm in your dataset) to make sure you don't load the same file twice?</description>
      <pubDate>Thu, 09 May 2019 16:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557511#M9996</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-05-09T16:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using conditional start to check date loaded on table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557579#M9999</link>
      <description>&lt;P&gt;Thanks. This is the solution we eventually settled for.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 19:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-conditional-start-to-check-date-loaded-on-table/m-p/557579#M9999</guid>
      <dc:creator>Soulbroda</dc:creator>
      <dc:date>2019-05-09T19:25:46Z</dc:date>
    </item>
  </channel>
</rss>

