<?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 Store macro variable based on values on two variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/654706#M196602</link>
    <description>&lt;P&gt;Hi, the idea is this.. I have data like this:&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input col1 $ col2 $ col3 $;&lt;BR /&gt;datalines;&lt;BR /&gt;A b file1&lt;BR /&gt;A c file2&lt;BR /&gt;A b file3&lt;BR /&gt;B b file4&lt;BR /&gt;B c file5&lt;BR /&gt;A b file6&lt;BR /&gt;B b file7&lt;BR /&gt;C a file8&lt;BR /&gt;C b file9&lt;BR /&gt;C a file10&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Depending on the combination of col1 and col2, I need to call in files from a directory and stack them together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file1, file3, file6 need to be "SET" together because they all have A for col1 and b for col2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;file2 will be called in and be "SET" alone because it's the only dataset with A for col1 and c for col2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Likewise, file4 and file7 together. file5 alone. file8 and file10 together. file9 alone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please help me start off? How do I divide col3 into file1&amp;amp;file3&amp;amp;file6, file2, file4&amp;amp;file7, file5, file8&amp;amp;file10 based on their combined values from col1 and col2?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance..&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jun 2020 00:03:09 GMT</pubDate>
    <dc:creator>gsk</dc:creator>
    <dc:date>2020-06-09T00:03:09Z</dc:date>
    <item>
      <title>Store macro variable based on values on two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/654706#M196602</link>
      <description>&lt;P&gt;Hi, the idea is this.. I have data like this:&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input col1 $ col2 $ col3 $;&lt;BR /&gt;datalines;&lt;BR /&gt;A b file1&lt;BR /&gt;A c file2&lt;BR /&gt;A b file3&lt;BR /&gt;B b file4&lt;BR /&gt;B c file5&lt;BR /&gt;A b file6&lt;BR /&gt;B b file7&lt;BR /&gt;C a file8&lt;BR /&gt;C b file9&lt;BR /&gt;C a file10&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Depending on the combination of col1 and col2, I need to call in files from a directory and stack them together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file1, file3, file6 need to be "SET" together because they all have A for col1 and b for col2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;file2 will be called in and be "SET" alone because it's the only dataset with A for col1 and c for col2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Likewise, file4 and file7 together. file5 alone. file8 and file10 together. file9 alone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please help me start off? How do I divide col3 into file1&amp;amp;file3&amp;amp;file6, file2, file4&amp;amp;file7, file5, file8&amp;amp;file10 based on their combined values from col1 and col2?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 00:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/654706#M196602</guid>
      <dc:creator>gsk</dc:creator>
      <dc:date>2020-06-09T00:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Store macro variable based on values on two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/654726#M196604</link>
      <description>&lt;P&gt;You could pass the list to a macro using call execute. Sort your data first so that your groups are ordered the way you want, and then import the files in the grouped order.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 01:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/654726#M196604</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-09T01:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Store macro variable based on values on two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/655542#M196667</link>
      <description>&lt;P&gt;It may also help to show the code where you intend to use the resulting variables.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 14:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-macro-variable-based-on-values-on-two-variables/m-p/655542#M196667</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-09T14:44:04Z</dc:date>
    </item>
  </channel>
</rss>

