<?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 How to make a new dataset which will be having only distict values of required variables from a dataset? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122334#M259835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;How to make a new dataset which will be having only distict values of required variables from a dataset? (using proc sql, if not possible then datastep.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 18:29:58 GMT</pubDate>
    <dc:creator>bonzybuddy</dc:creator>
    <dc:date>2013-04-26T18:29:58Z</dc:date>
    <item>
      <title>How to make a new dataset which will be having only distict values of required variables from a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122334#M259835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;How to make a new dataset which will be having only distict values of required variables from a dataset? (using proc sql, if not possible then datastep.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122334#M259835</guid>
      <dc:creator>bonzybuddy</dc:creator>
      <dc:date>2013-04-26T18:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122335#M259836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will get the word "select" six times, the word "from" six times and the word "where" six times, plus of course the text in between six times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That doesn't sound like what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;sometext is not defined&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None of this will work unless it is inside a macro, I hope you realize that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your variables will be named var1_var, var2_var, ... (is that really what you want?) and each will be identical to the others because each time you are selecting distinct var1 from the same data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure exactly what you want to obtain in this example ... in fact, its not even clear why you need a macro here unless the number 6 can change from run to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically, I don't understand what you are trying to do, and I think a bit of a description would be necessary before we could advise further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122335#M259836</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-04-26T18:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122336#M259837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes all this things are inside a macro. I just gave a rough example.&lt;/P&gt;&lt;P&gt;Bsically I want to create a dataset1 to which I want to add variables with unique values from another dataset2 with "WHERE" conditing. The WHERE condition itself gets values from a macro variable.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:48:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122336#M259837</guid>
      <dc:creator>bonzybuddy</dc:creator>
      <dc:date>2013-04-26T18:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122337#M259838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you could write out a small example without macros to show me what you want to achieve. Because as stated, it seems like you are using the same var1 and dataset1 in each loop through the macro, which makes no sense, you will get the same results in each column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:51:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122337#M259838</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-04-26T18:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122338#M259839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. Explaining you otherway,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;How to make a new dataset which will be having only distict values of required variables from a dataset? (using proc sql, if not possible then datastep.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes some sense. If not I will write steps;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122338#M259839</guid>
      <dc:creator>bonzybuddy</dc:creator>
      <dc:date>2013-04-26T18:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122339#M259840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know, you'd have to create a data set separately for each required variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL doesn't really work if var1 has 12 distinct values and var2 has 5 distinct values, unless you want (possibly) 60 unique combinations of var1 and var2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 19:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122339#M259840</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-04-26T19:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122340#M259841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be if someone can comeup with something or using datastep. &lt;/P&gt;&lt;P&gt;Anyways, Thanks man. &lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 19:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122340#M259841</guid>
      <dc:creator>bonzybuddy</dc:creator>
      <dc:date>2013-04-26T19:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: %do loop inside proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122341#M259842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post some example with data.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 19:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122341#M259842</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-26T19:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new dataset which will be having only distict values of required variables from a dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122342#M259843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get distinct varibale values, you may try the simple code:&lt;/P&gt;&lt;P&gt;Proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct var1,var2,var3,var4,var5,var6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from dset1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where condt1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 21:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-a-new-dataset-which-will-be-having-only-distict/m-p/122342#M259843</guid>
      <dc:creator>ChandraReddy</dc:creator>
      <dc:date>2013-04-26T21:26:33Z</dc:date>
    </item>
  </channel>
</rss>

