<?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: Inserting new row into dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21352#M4500</link>
    <description>I dont think you can achieve that within one data-input-cards-... step for this purpose. use proc sql insert into and order. this should do both inserting and sorting in one step systematically.</description>
    <pubDate>Tue, 24 Nov 2009 15:57:44 GMT</pubDate>
    <dc:creator>abdullala</dc:creator>
    <dc:date>2009-11-24T15:57:44Z</dc:date>
    <item>
      <title>Inserting new row into dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21350#M4498</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Data X;&lt;BR /&gt;
Input id$;&lt;BR /&gt;
cards;&lt;BR /&gt;
A&lt;BR /&gt;
B&lt;BR /&gt;
D&lt;BR /&gt;
E&lt;BR /&gt;
Run;&lt;BR /&gt;
&lt;BR /&gt;
output:&lt;BR /&gt;
A&lt;BR /&gt;
B&lt;BR /&gt;
C&lt;BR /&gt;
D&lt;BR /&gt;
E&lt;BR /&gt;
F&lt;BR /&gt;
&lt;BR /&gt;
now i want to insert C after B.with out splitting the dataset</description>
      <pubDate>Tue, 24 Nov 2009 10:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21350#M4498</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2009-11-24T10:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new row into dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21351#M4499</link>
      <description>Your problem can be solved by using IF- and OUTPUT-statement:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data x;&lt;BR /&gt;
  set x;&lt;BR /&gt;
  output; /* (1) */&lt;BR /&gt;
  if id = 'B' then do; &lt;BR /&gt;
    id = 'C';&lt;BR /&gt;
    output;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;[/pre]&lt;BR /&gt;
(1): Automatic output is disabled as soon as one output-statement is coded.</description>
      <pubDate>Tue, 24 Nov 2009 11:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21351#M4499</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2009-11-24T11:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new row into dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21352#M4500</link>
      <description>I dont think you can achieve that within one data-input-cards-... step for this purpose. use proc sql insert into and order. this should do both inserting and sorting in one step systematically.</description>
      <pubDate>Tue, 24 Nov 2009 15:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-new-row-into-dataset/m-p/21352#M4500</guid>
      <dc:creator>abdullala</dc:creator>
      <dc:date>2009-11-24T15:57:44Z</dc:date>
    </item>
  </channel>
</rss>

