<?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: Need help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356713#M83666</link>
    <description>&lt;P&gt;Is it possible? Almost anything is possible.&lt;/P&gt;
&lt;P&gt;Do I know what you're trying to do? No!&lt;/P&gt;
&lt;P&gt;Can one write code that produces what you want? Of course!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
  input x $ y z;
  cards;
aa 11 101
bb 14 201
cc 13 303
dd 12 404
dd 17 505
;

data x(keep=x) y(keep=y y1) z(keep=z z1);
  set have;
  select (_n_);
    when (1) do;
      y1=4;
      z1=1;
    end;
    when (2) do;
      y1=3;
      z1=3;
    end;
    when (3) do;
      y1=5;
      z1=4;
    end;
    when (4) do;
      x='aa';
      y1=1;
      z1=5;
    end;
    otherwise do;
      y1=2;
      z1=2;
    end;
  end;
run;

proc sort data=x;
  by x;
run;

proc sort data=y;
  by y1;
run;

proc sort data=z;
  by z1;
run;

data want (keep=x y z);
  set x;
  set y;
  set z;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 May 2017 15:12:48 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-05-07T15:12:48Z</dc:date>
    <item>
      <title>Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356694#M83657</link>
      <description>Can anyone help how to move values from one observation to another?&lt;BR /&gt;&lt;BR /&gt;aa 11 101&lt;BR /&gt;bb 14 201&lt;BR /&gt;cc 13 303&lt;BR /&gt;dd 12 404&lt;BR /&gt;dd 17 505&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;O/P like this&lt;BR /&gt;aa 12 101&lt;BR /&gt;aa 17 505&lt;BR /&gt;bb 14 201&lt;BR /&gt;cc 11 303&lt;BR /&gt;dd 13 404&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Can it be possible?</description>
      <pubDate>Sun, 07 May 2017 09:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356694#M83657</guid>
      <dc:creator>Praveenit0808</dc:creator>
      <dc:date>2017-05-07T09:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356695#M83658</link>
      <description>&lt;P&gt;Hi Praveen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you'll have to give us some more detail about the logic you want to use in order to get an answer to this&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2017 10:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356695#M83658</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-05-07T10:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356711#M83665</link>
      <description>&lt;P&gt;I dont see the logic here, please provide more information.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2017 14:26:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356711#M83665</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-05-07T14:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356713#M83666</link>
      <description>&lt;P&gt;Is it possible? Almost anything is possible.&lt;/P&gt;
&lt;P&gt;Do I know what you're trying to do? No!&lt;/P&gt;
&lt;P&gt;Can one write code that produces what you want? Of course!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
  input x $ y z;
  cards;
aa 11 101
bb 14 201
cc 13 303
dd 12 404
dd 17 505
;

data x(keep=x) y(keep=y y1) z(keep=z z1);
  set have;
  select (_n_);
    when (1) do;
      y1=4;
      z1=1;
    end;
    when (2) do;
      y1=3;
      z1=3;
    end;
    when (3) do;
      y1=5;
      z1=4;
    end;
    when (4) do;
      x='aa';
      y1=1;
      z1=5;
    end;
    otherwise do;
      y1=2;
      z1=2;
    end;
  end;
run;

proc sort data=x;
  by x;
run;

proc sort data=y;
  by y1;
run;

proc sort data=z;
  by z1;
run;

data want (keep=x y z);
  set x;
  set y;
  set z;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2017 15:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356713#M83666</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-05-07T15:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356714#M83667</link>
      <description>&lt;P&gt;&lt;EM&gt;Is it possible? Almost anything is possible.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Do I know what you're trying to do? No!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can one write code that produces what you want? Of course!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp; I love your &lt;U&gt;sense of humor&lt;/U&gt;. I hope you are having a great weekend!&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2017 15:47:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356714#M83667</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-05-07T15:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356738#M83676</link>
      <description>&lt;P&gt;This is an excellent response, and should be marked as the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it's so good, we don't need to know what the problem is. ... and we don't.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2017 19:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356738#M83676</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-07T19:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356821#M83724</link>
      <description>Yes thank so you much for your prompt response ....I'll definitely implement those steps in my program ...</description>
      <pubDate>Mon, 08 May 2017 09:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/356821#M83724</guid>
      <dc:creator>Praveenit0808</dc:creator>
      <dc:date>2017-05-08T09:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/357122#M83815</link>
      <description>Thank you so much for helping me. However what exactly I need is. Here is&lt;BR /&gt;the problem:&lt;BR /&gt;&lt;BR /&gt;Input name $ status ;&lt;BR /&gt;Cards;&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Bb deactivated&lt;BR /&gt;Bb deactivated&lt;BR /&gt;Bb deactivated&lt;BR /&gt;Dd deactivated&lt;BR /&gt;Dd deactivated&lt;BR /&gt;Ee active&lt;BR /&gt;Ee active&lt;BR /&gt;Ee active&lt;BR /&gt;Cc active&lt;BR /&gt;Cc active&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;BR /&gt;&lt;BR /&gt;O/p should be like this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Aa active&lt;BR /&gt;Cc active&lt;BR /&gt;Cc active&lt;BR /&gt;Cc active&lt;BR /&gt;Ee active&lt;BR /&gt;Ee active&lt;BR /&gt;Ee active&lt;BR /&gt;Ee active&lt;BR /&gt;Ee active&lt;BR /&gt;Cc active&lt;BR /&gt;Cc active&lt;BR /&gt;&lt;BR /&gt;How do we do that?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Tue, 09 May 2017 11:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help/m-p/357122#M83815</guid>
      <dc:creator>Praveenit0808</dc:creator>
      <dc:date>2017-05-09T11:10:29Z</dc:date>
    </item>
  </channel>
</rss>

