<?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 Dynamically how to compare two different sas datasets based on same prefix name. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695543#M212261</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have SAS datasets like this attached image. Based on FILENAME I am able to import as SAS datasets from source. Once after that I would like compare datasets based on COL1 and COL2 group as per the prefix file name. This will be as dynamic process. So the file name might be differ in next month. It shouldn't hard coded. We might be receiving same&amp;nbsp;prefix name files with in a month twice or thrice in different dates. So how to compare two different SAS datasets to find out if there are any records difference.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;ABC_20200909_INITIAL&lt;/P&gt;&lt;P&gt;ABC_20200901_INITIAL&lt;/P&gt;&lt;P&gt;I would like to know some sample Macro to do this. Could you please provide me?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample SAS Table.PNG" style="width: 510px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51253iFF66B89DCC76B19E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sample SAS Table.PNG" alt="Sample SAS Table.PNG" /&gt;&lt;/span&gt;&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>Fri, 30 Oct 2020 17:11:28 GMT</pubDate>
    <dc:creator>SahooP</dc:creator>
    <dc:date>2020-10-30T17:11:28Z</dc:date>
    <item>
      <title>Dynamically how to compare two different sas datasets based on same prefix name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695543#M212261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have SAS datasets like this attached image. Based on FILENAME I am able to import as SAS datasets from source. Once after that I would like compare datasets based on COL1 and COL2 group as per the prefix file name. This will be as dynamic process. So the file name might be differ in next month. It shouldn't hard coded. We might be receiving same&amp;nbsp;prefix name files with in a month twice or thrice in different dates. So how to compare two different SAS datasets to find out if there are any records difference.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;ABC_20200909_INITIAL&lt;/P&gt;&lt;P&gt;ABC_20200901_INITIAL&lt;/P&gt;&lt;P&gt;I would like to know some sample Macro to do this. Could you please provide me?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample SAS Table.PNG" style="width: 510px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51253iFF66B89DCC76B19E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sample SAS Table.PNG" alt="Sample SAS Table.PNG" /&gt;&lt;/span&gt;&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>Fri, 30 Oct 2020 17:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695543#M212261</guid>
      <dc:creator>SahooP</dc:creator>
      <dc:date>2020-10-30T17:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically how to compare two different sas datasets based on same prefix name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695559#M212263</link>
      <description>&lt;P&gt;What exactly do you want to compare?&lt;/P&gt;
&lt;P&gt;What might the expected output look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If Col1 and Col2 are built from the data set names I find the order of the numbering extremely odd.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are indeed looking at SAS data sets then there would be no macro needed at all. SAS maintains characteristics of all the SAS data sets available and the list is searchable. The question might be "in what library do these data sets reside"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 17:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695559#M212263</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-30T17:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically how to compare two different sas datasets based on same prefix name.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695831#M212390</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Scenario1:&lt;BR /&gt;There might be one or more files for a month, if the Practitioner is listed on the monthly file generated previously and the same is listed in the current file without any changes, then update the date to the latest file generated date in 'File Date' column.&lt;BR /&gt;File Date column&amp;nbsp;I have extracted in my above screenshot document which is date variable.&lt;/P&gt;&lt;P&gt;Scenario2:&lt;BR /&gt;Practitioner is listed on the monthly file generated previously and the same is listed in the current file with any changes/updates, then update it as a new record with file generation date in file date column, where the old record remains same.&lt;/P&gt;&lt;P&gt;Example:&lt;BR /&gt;Group1.&lt;BR /&gt;ABC_20200909_INITIAL&lt;BR /&gt;ABC_20200901_INITIAL&lt;/P&gt;&lt;P&gt;Group2.&lt;BR /&gt;ABC_20200909_RECRED&lt;BR /&gt;ABC_20200909_RECRED&lt;/P&gt;&lt;P&gt;Note: The comparison should happen based on file prefix and suffix name. It seems we have same prefix but suffix is changed.(INITIAL AND RECRED)&lt;/P&gt;&lt;P&gt;This will be as dynamic process. So the same file might not&amp;nbsp;be fall in next month. It can be some other file&amp;nbsp;as well.&amp;nbsp;It shouldn't hard coded. I have given screenshot is one of the example.&lt;/P&gt;&lt;P&gt;Data sets will reside work library.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 06:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dynamically-how-to-compare-two-different-sas-datasets-based-on/m-p/695831#M212390</guid>
      <dc:creator>SahooP</dc:creator>
      <dc:date>2020-11-02T06:28:54Z</dc:date>
    </item>
  </channel>
</rss>

