<?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 create data sets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540381#M149053</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Guys&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have sas help library like sas help.class in this data sets 19 observation is there how to create 19 observation in 19 data sets&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Advance Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2019 09:37:16 GMT</pubDate>
    <dc:creator>bismilla</dc:creator>
    <dc:date>2019-03-05T09:37:16Z</dc:date>
    <item>
      <title>how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540381#M149053</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Guys&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have sas help library like sas help.class in this data sets 19 observation is there how to create 19 observation in 19 data sets&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Advance Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 09:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540381#M149053</guid>
      <dc:creator>bismilla</dc:creator>
      <dc:date>2019-03-05T09:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540386#M149056</link>
      <description>&lt;P&gt;What for? You can always use the original dataset.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 10:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540386#M149056</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-05T10:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540389#M149059</link>
      <description>&lt;P&gt;Sorry, its not clear what you mean.&amp;nbsp; Do you want 19 copies of the same dataset, or 19 datasets with one record in each?&amp;nbsp; Either way it really does not sound like th ebest way to go about doing whatever it is you want to do.&amp;nbsp; SAS has inbuilt by group processing, so printing data by a variable and doing sums by a variable is far simpler using that.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 10:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540389#M149059</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-05T10:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540392#M149061</link>
      <description>&lt;P&gt;for exp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds1;&lt;/P&gt;&lt;P&gt;set&amp;nbsp; sas help.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this data set we have 19 observation and 5 variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need 19 observation in 19 data set name ds1 ds19 like that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks advance&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 10:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540392#M149061</guid>
      <dc:creator>bismilla</dc:creator>
      <dc:date>2019-03-05T10:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540393#M149062</link>
      <description>&lt;P&gt;Since these are just copies of the original, this is a useless waste of time. Use your mind for something that makes sense.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 10:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540393#M149062</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-05T10:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540397#M149064</link>
      <description>&lt;P&gt;that the reason iam asking this the interview questions&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 10:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540397#M149064</guid>
      <dc:creator>bismilla</dc:creator>
      <dc:date>2019-03-05T10:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540400#M149067</link>
      <description>&lt;P&gt;Its possible, you could just put all the dsX on the data line, or you could be more complicated with:&lt;/P&gt;
&lt;PRE&gt;data _null_;&lt;BR /&gt;  set sashelp.vtable (where=(libname="SASHELP" and memname="CLASS"));
  do i=1 to nobs;
    call execute(cats('data ds',put(i,best.),'; set sashelp.class; run;'));
  end;
run;&lt;/PRE&gt;
&lt;P&gt;At the end of the day its pointless and a question like that would put me off the role.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;** Updated to be dynamic with number of observations.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 11:20:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540400#M149067</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-05T11:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540407#M149072</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint; 
  select count(*) 
  into :NUMBEROBS
  from sashelp.cars;
quit; 

data %MACRO TABLES; /* create the tables */
    %do i = 1 %to &amp;amp;NUMBEROBS; 
    work.OBS&amp;amp;i
    %end; 
    %mend;
    %tables; 
  set sashelp.cars;
  %MACRO TESTS; /* assign the obs to each table */
    %do i = 1 %to &amp;amp;NUMBEROBS; 
    if _N_ = &amp;amp;i then
      output work.obs&amp;amp;i; 
    %end; 
    %mend;  
    %Tests;
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 11:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540407#M149072</guid>
      <dc:creator>VRKiwi</dc:creator>
      <dc:date>2019-03-05T11:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540409#M149074</link>
      <description>&lt;P&gt;Or depending on what OP wants:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set sashelp.class;
  call execute(catt('data ds',_N_,'; set sashelp.class(firstobs=',_N_,' obs= ',_N_,'); run;'));
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 11:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540409#M149074</guid>
      <dc:creator>VRKiwi</dc:creator>
      <dc:date>2019-03-05T11:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540410#M149075</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265036"&gt;@bismilla&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;that the reason iam asking this the interview questions&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If &lt;STRONG&gt;I&lt;/STRONG&gt; put such a question into a interview questionnaire, I would only accept candidates that answer "I don't do it, it's useless".&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 11:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540410#M149075</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-05T11:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540505#M149109</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265036"&gt;@bismilla&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;for exp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data ds1;&lt;/P&gt;
&lt;P&gt;set&amp;nbsp; sas help.class;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in this data set we have 19 observation and 5 variable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i need 19 observation in 19 data set name ds1 ds19 like that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks advance&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Actually that code will generate &lt;STRONG&gt;errors&amp;nbsp;&lt;/STRONG&gt; as the LIBRARY name is one word: SASHELP not "SAS HELP". Your code would be asking to combine a data set name SAS in the default library, most likely WORK with&amp;nbsp;a set named CLASS&amp;nbsp;in a likely undefined library named HELP. Spelling really does count when it comes to programming.&lt;/P&gt;
&lt;P&gt;See this log:&lt;/P&gt;
&lt;PRE&gt;1    data ds1;
2       set  sas help.class;
ERROR: File WORK.SAS.DATA does not exist.
ERROR: Libref HELP is not assigned.
3    run;&lt;/PRE&gt;
&lt;P&gt;Which also demonstrates the use of the code box opened using the forum's {I} icon. It is better to post code and log entries into the code box as the forum main windows will reformat code and place additional characters that will sometimes prevent code from running when copied from the window.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 17:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540505#M149109</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-05T17:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to create data sets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540663#M149185</link>
      <description>&lt;P&gt;Thank you so much thanks for your supporting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 06:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-data-sets/m-p/540663#M149185</guid>
      <dc:creator>bismilla</dc:creator>
      <dc:date>2019-03-06T06:54:15Z</dc:date>
    </item>
  </channel>
</rss>

