<?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: How do I add two extra empty rows to my dataset? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10519#M1006</link>
    <description>You could also use PROC SQL to do it&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  &lt;BR /&gt;
  create table shoes as&lt;BR /&gt;
    select *&lt;BR /&gt;
	from sashelp.shoes;&lt;BR /&gt;
&lt;BR /&gt;
  insert into work.shoes&lt;BR /&gt;
    set Region="";&lt;BR /&gt;
  insert into work.shoes&lt;BR /&gt;
    set Region="";&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
In the SET clause just pick any variable that is in your data set&lt;BR /&gt;
&lt;BR /&gt;
D</description>
    <pubDate>Tue, 27 Apr 2010 17:41:41 GMT</pubDate>
    <dc:creator>darrylovia</dc:creator>
    <dc:date>2010-04-27T17:41:41Z</dc:date>
    <item>
      <title>How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10516#M1003</link>
      <description>hi people, &lt;BR /&gt;
&lt;BR /&gt;
I know SAS can do this through Edit mode by adding rows to the dataset manually. However, I am writting an automated script so I need to write out the sas code to add two extra empty rows to my dataset. &lt;BR /&gt;
&lt;BR /&gt;
Hoping someone can give me some directions! &lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Yennie</description>
      <pubDate>Tue, 27 Apr 2010 00:51:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10516#M1003</guid>
      <dc:creator>Yennie</dc:creator>
      <dc:date>2010-04-27T00:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10517#M1004</link>
      <description>Empty rows -not sure why but you can assign a MISSING or BLANK value to all variables in the dataset and issue the OUTPUT;  command.  Possibly you might want to explain why you need this condition?&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 27 Apr 2010 01:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10517#M1004</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-04-27T01:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10518#M1005</link>
      <description>Hi:&lt;BR /&gt;
  You will want to test for the end of the input file so that you only write out your two empty observations at the end. The END= option allows you to perform this test, as shown below.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data newclass;&lt;BR /&gt;
  ** create variable to signal end of input file;&lt;BR /&gt;
  set sashelp.class end=nomore;&lt;BR /&gt;
                        &lt;BR /&gt;
  ** output regular observations;&lt;BR /&gt;
  output;&lt;BR /&gt;
                                     &lt;BR /&gt;
  ** test for end of file. At end, NOMORE = 1;&lt;BR /&gt;
  if nomore then do;&lt;BR /&gt;
     ** set variables to missing;&lt;BR /&gt;
     name = ' ';&lt;BR /&gt;
     sex = ' ';&lt;BR /&gt;
     height = .;&lt;BR /&gt;
     age = .;&lt;BR /&gt;
     weight = .;&lt;BR /&gt;
     ** output 2 "empty" observations;&lt;BR /&gt;
     output;&lt;BR /&gt;
     output;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                                  &lt;BR /&gt;
ods listing;&lt;BR /&gt;
proc print data=newclass;&lt;BR /&gt;
  title '2 "empty" observations at end of file';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 27 Apr 2010 15:05:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10518#M1005</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-04-27T15:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10519#M1006</link>
      <description>You could also use PROC SQL to do it&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  &lt;BR /&gt;
  create table shoes as&lt;BR /&gt;
    select *&lt;BR /&gt;
	from sashelp.shoes;&lt;BR /&gt;
&lt;BR /&gt;
  insert into work.shoes&lt;BR /&gt;
    set Region="";&lt;BR /&gt;
  insert into work.shoes&lt;BR /&gt;
    set Region="";&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
In the SET clause just pick any variable that is in your data set&lt;BR /&gt;
&lt;BR /&gt;
D</description>
      <pubDate>Tue, 27 Apr 2010 17:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10519#M1006</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2010-04-27T17:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10520#M1007</link>
      <description>Hi Cynthia, &lt;BR /&gt;
&lt;BR /&gt;
That really helps lots! &lt;BR /&gt;
&lt;BR /&gt;
Many many thanks!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Yennie</description>
      <pubDate>Tue, 27 Apr 2010 23:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/10520#M1007</guid>
      <dc:creator>Yennie</dc:creator>
      <dc:date>2010-04-27T23:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/421088#M67951</link>
      <description>&lt;P&gt;Hi Cynthia,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use SAS Enterprise Miner.&amp;nbsp;&lt;SPAN&gt;SAS Enterprise Miner automatically added 2 empty rows to my dataset after imported dataset. I am not sure why it did that. Is there any method I can remove those rows? Thank you for your help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Stewart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 06:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/421088#M67951</guid>
      <dc:creator>Stewartli</dc:creator>
      <dc:date>2017-12-14T06:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/421142#M67952</link>
      <description>&lt;P&gt;The fastest and easiest way to do it is probably to modify the dataset in place:&lt;/P&gt;&lt;PRE&gt;data x;
  if 0 then modify x; /* modify, but do not read any rows */
  output;
  output;&lt;BR /&gt;  stop;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Dec 2017 10:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/421142#M67952</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2017-12-14T10:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add two extra empty rows to my dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/421736#M67984</link>
      <description>Thank you Iassen. Appreciate it.</description>
      <pubDate>Sat, 16 Dec 2017 00:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-two-extra-empty-rows-to-my-dataset/m-p/421736#M67984</guid>
      <dc:creator>Stewartli</dc:creator>
      <dc:date>2017-12-16T00:25:13Z</dc:date>
    </item>
  </channel>
</rss>

