<?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: Sort (Proc) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508218#M136455</link>
    <description>&lt;P&gt;A simple sort will be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=chuck1;
   by descending state age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;without duplicates:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=chuck1 out=chuck2 nodupkey;
   by subj_no;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 02:09:11 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2018-10-29T02:09:11Z</dc:date>
    <item>
      <title>Sort (Proc)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508186#M136445</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;I have 2 problems and i will appreciate appropriate codes for each case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The data set i attached here is called "Chuck1" and i want to sort this data so that the observations are listed (grouped) by state with the first observation having a value of 'TX' and the youngest person in that state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I also want to write a second code that will help me sort "chuck1" so that there is only one observation per person (Subj_no identifies each person in the data set). I don't want to overwrite the original data set, but rather to put the sorted data into a new data set called 'Chuck2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help is needed!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24445i225200721D7AE98B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Oct 2018 22:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508186#M136445</guid>
      <dc:creator>ChuksManuel</dc:creator>
      <dc:date>2018-10-28T22:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sort (Proc)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508187#M136446</link>
      <description>&lt;P&gt;Please post your sample data in the form of a SAS datastep with datalines to represent the data so that we can read you sample data into a SAS dataset.&lt;/P&gt;&lt;P&gt;Otherwise we have to enter all your sample from a snapshot to get an understanding of the data and the data types.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Oct 2018 22:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508187#M136446</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-10-28T22:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sort (Proc)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508218#M136455</link>
      <description>&lt;P&gt;A simple sort will be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=chuck1;
   by descending state age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;without duplicates:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=chuck1 out=chuck2 nodupkey;
   by subj_no;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 02:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508218#M136455</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-10-29T02:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sort (Proc)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508228#M136463</link>
      <description>&lt;P&gt;Thanks Shmuel!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 03:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Proc/m-p/508228#M136463</guid>
      <dc:creator>ChuksManuel</dc:creator>
      <dc:date>2018-10-29T03:45:28Z</dc:date>
    </item>
  </channel>
</rss>

