<?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: creating datasets based on the varible values in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173109#M13263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A problem can be solved in many ways. generally your approach is simple and easy to understand. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Oct 2014 14:07:28 GMT</pubDate>
    <dc:creator>rajeshm</dc:creator>
    <dc:date>2014-10-07T14:07:28Z</dc:date>
    <item>
      <title>creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173099#M13253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if anyone having a program for creating a datsets based on the varible values,pls share me&amp;nbsp; or&amp;nbsp;&amp;nbsp; modify my below code.&lt;/P&gt;&lt;P&gt;interested to know modifcation of below code,&amp;nbsp; so that&amp;nbsp; i can understand where I done mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp; to get a list of varible values into a macro varible&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;STRONG&gt;select distinct make into : makes separated by ' ' from sashelp.cars where make not like '%-%'order by make;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. creating different datasets based on the varible values;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=sashelp.cars out=cars;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by make;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;data &amp;amp;makes;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set cars;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by make;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;retain i 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;localmakes=&amp;amp;makes;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;put localmakes;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if first.make&amp;nbsp; then &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; do;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; output scan(localmakes,i,' ');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; i+1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to print&amp;nbsp; macro varible values line by line( macrovarible =1 2 3) want output like &lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 07:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173099#M13253</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-06T07:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173100#M13254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try the below code. hope this is what you are trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt; set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select distinct name into:name1-:name&amp;amp;sysmaxlong from class;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt;%do i = 1 %to &amp;amp;sqlobs;&lt;/P&gt;&lt;P&gt;data &amp;amp;&amp;amp;name&amp;amp;i;&lt;/P&gt;&lt;P&gt;set class;&lt;/P&gt;&lt;P&gt;where name = "&amp;amp;&amp;amp;name&amp;amp;i";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code will generate a separate dataset for every value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 09:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173100#M13254</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2014-10-06T09:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173101#M13255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, it's working!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me why we've used double ampersand in data step below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &lt;STRONG&gt;&amp;amp;&amp;amp;name&amp;amp;i&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;set class;&lt;/P&gt;&lt;P&gt;where name = &lt;STRONG&gt;"&amp;amp;&amp;amp;name&amp;amp;i";&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 10:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173101#M13255</guid>
      <dc:creator>RamKumar</dc:creator>
      <dc:date>2014-10-06T10:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173102#M13256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason for using it is , if i use &amp;amp;name&amp;amp;i it will try to resolve &amp;amp;name first and then &amp;amp;i, however since we do not have any values for &amp;amp;name, we will get a warning. So if we place &amp;amp;&amp;amp;name&amp;amp;i, this will resolve to &amp;amp;name1 first and then &amp;amp;name1 will resolve to the name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 10:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173102#M13256</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2014-10-06T10:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173103#M13257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! It was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 10:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173103#M13257</guid>
      <dc:creator>RamKumar</dc:creator>
      <dc:date>2014-10-06T10:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173104#M13258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If data was not very very big .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;
data class;
 set sashelp.class;
run;

proc sort data=class;by sex;run;
data _null_;
 if _n_ eq 1 then do;
&amp;nbsp; if 0 then set class;
&amp;nbsp; declare hash ha(multidata:'y');
&amp;nbsp;&amp;nbsp; ha.definekey('sex');
&amp;nbsp;&amp;nbsp; ha.definedata('name','age','sex','weight','height'); 
&amp;nbsp;&amp;nbsp; ha.definedone();
end;
set class;
by sex;
ha.add();
if last.sex then do; ha.output(dataset: sex);ha.clear(); end;
run;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 12:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173104#M13258</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-10-06T12:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173105#M13259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note the first suggestion of to NOT DO this in general:&lt;/P&gt;&lt;P&gt;Here's a variety of different ways if you choose to regardless.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Split_Data_into_Subsets" title="http://www.sascommunity.org/wiki/Split_Data_into_Subsets"&gt;Split Data into Subsets - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 13:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173105#M13259</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-06T13:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173106#M13260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;sorry to ask in this way.&lt;/P&gt;&lt;P&gt;1. if you can could you help me in changing my code to do the same task(without macro) with a datastep.&lt;/P&gt;&lt;P&gt;2. how to print macro varible vales one by one.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ex:&lt;/LI&gt;&lt;LI&gt;&amp;amp;let numbers =1 2 3;&lt;/LI&gt;&lt;LI&gt;%put numbers;&amp;nbsp;&amp;nbsp; --&amp;gt; need output like this.how to print this way/&lt;/LI&gt;&lt;LI&gt;1&lt;/LI&gt;&lt;LI&gt;2&lt;/LI&gt;&lt;LI&gt;3&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 18:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173106#M13260</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-06T18:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173107#M13261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me in this.(you can copy and paster this code as it is in your loca). got a macro for the same task which is working fine. but I want to understand where I am doing mistake in the following approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* selecting all varible values from a varible in a table;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select distinct make into : makes separated by ' ' from sashelp.cars order by make;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;* due to variable value&amp;nbsp; mercedes-benz compressing and printing the values;&lt;/P&gt;&lt;P&gt;%let makes=%sysfunc(compress(&amp;amp;makes,'-'));&amp;nbsp; &lt;/P&gt;&lt;P&gt;%put &amp;amp;makes;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;nbsp; sorting the dataset to get the different values of varibles one by one(group processing);&lt;/P&gt;&lt;P&gt;proc sort data=sashelp.cars out=cars;&lt;/P&gt;&lt;P&gt;by make;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;* want to get each distinct value from varible and making&amp;nbsp; output to corresponding dataset.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;data &amp;amp;makes;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;set cars;&lt;/P&gt;&lt;P&gt;by make;&lt;/P&gt;&lt;P&gt;retain i 1;&lt;/P&gt;&lt;P&gt;if first.make&amp;nbsp; then &lt;/P&gt;&lt;P&gt;&amp;nbsp; do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output scan("&amp;amp;makes",i,' ');&lt;/P&gt;&lt;P&gt;&amp;nbsp; i+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 05:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173107#M13261</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-07T05:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173108#M13262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;proc sql ;
select distinct compress(make,,'ka') into : makes separated by ' ' from sashelp.cars ;
select distinct 'when("'||strip(make)||'") output '||compress(make,,'ka') into : selects separated by ';' from sashelp.cars ;
quit;


data &amp;amp;makes;
set sashelp.cars;
select(make);
&amp;amp;selects ;
otherwise;
end;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 13:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173108#M13262</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-10-07T13:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173109#M13263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A problem can be solved in many ways. generally your approach is simple and easy to understand. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 14:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173109#M13263</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-07T14:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173110#M13264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993; font-size: 12pt;"&gt;&lt;STRONG&gt;Call Execute is also a power method:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993; font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;sort&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;data&lt;/SPAN&gt;=sashelp.cars; &lt;SPAN style="color: #0433ff;"&gt;by&lt;/SPAN&gt; make; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;_null_&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;set&lt;/SPAN&gt; sashelp.cars;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;by&lt;/SPAN&gt; make;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;if&lt;/SPAN&gt; first.make &lt;SPAN style="color: #0433ff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;do&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0433ff;"&gt;call&lt;/SPAN&gt; execute (&lt;SPAN style="color: #942193;"&gt;" data "&lt;/SPAN&gt;|| compress(make, &lt;SPAN style="color: #942193;"&gt;'-'&lt;/SPAN&gt;) || &lt;SPAN style="color: #942193;"&gt;"; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #942193;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; set sashelp.cars;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #942193;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; where make="&lt;SPAN style="color: #000000;"&gt; || quote(make) ||&lt;/SPAN&gt;";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #942193;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; run;"&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;end&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 14:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173110#M13264</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-07T14:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173111#M13265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp; a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought some what wrong with the code due to color in editor. but executed fine and got the results.&lt;/P&gt;&lt;P&gt;I don't know whether you observed my code or not. could you pls help me , bcaz I tried to do with first.make but unable to do.&lt;/P&gt;&lt;P&gt;please observe my code and if you can please change my code&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11290i060AD88398B1DA4C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="redcolor.png" title="redcolor.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 14:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173111#M13265</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-07T14:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: creating datasets based on the varible values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173112#M13266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is correct, the colour is due to text strings which the editor colours. If you don't want the colours don't use the enhanced editor. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 14:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/creating-datasets-based-on-the-varible-values/m-p/173112#M13266</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-07T14:51:36Z</dc:date>
    </item>
  </channel>
</rss>

