<?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 change dataset like this in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-dataset-like-this/m-p/80460#M23143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to get need from have(move variable y upward two cells)&amp;nbsp; in one data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input x y;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3 a&lt;/P&gt;&lt;P&gt;4 b&lt;/P&gt;&lt;P&gt;5 c&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;need:&lt;/P&gt;&lt;P&gt;x y&lt;/P&gt;&lt;P&gt;1 a&lt;/P&gt;&lt;P&gt;2 b&lt;/P&gt;&lt;P&gt;3 c&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2012 21:43:27 GMT</pubDate>
    <dc:creator>George_S</dc:creator>
    <dc:date>2012-04-11T21:43:27Z</dc:date>
    <item>
      <title>How to change dataset like this</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-dataset-like-this/m-p/80460#M23143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to get need from have(move variable y upward two cells)&amp;nbsp; in one data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input x y;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3 a&lt;/P&gt;&lt;P&gt;4 b&lt;/P&gt;&lt;P&gt;5 c&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;need:&lt;/P&gt;&lt;P&gt;x y&lt;/P&gt;&lt;P&gt;1 a&lt;/P&gt;&lt;P&gt;2 b&lt;/P&gt;&lt;P&gt;3 c&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 21:43:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-dataset-like-this/m-p/80460#M23143</guid>
      <dc:creator>George_S</dc:creator>
      <dc:date>2012-04-11T21:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to change dataset like this</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-dataset-like-this/m-p/80461#M23144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards missover;&lt;/P&gt;&lt;P&gt;input x y $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3 a&lt;/P&gt;&lt;P&gt;4 b&lt;/P&gt;&lt;P&gt;5 c&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data need;&lt;/P&gt;&lt;P&gt; merge have(keep=x) have(firstobs=3 keep=y);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 22:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-dataset-like-this/m-p/80461#M23144</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-11T22:08:28Z</dc:date>
    </item>
  </channel>
</rss>

