<?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: Proc sort in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sort/m-p/612225#M76833</link>
    <description>&lt;P&gt;You don't need PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=totalyears n mean stderr;
    class year;
    var gpa;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Dec 2019 21:26:39 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-12-16T21:26:39Z</dc:date>
    <item>
      <title>Proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sort/m-p/612215#M76832</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to get the output for the average GPS for every year from my dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried proc sort, but can manage to get a correct output. I have the years from 2015-2019.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
infile '/folders/myfolders/MY SAS Files/Data/finaldata.txt';
input ID gpa hsrank act year;
label ID = 'Identification'
	  gpa = 'Grade-point average following freshman year'
	  hsrank = 'High school class rank as percentile'
	  act = 'ACT entrence examination score'
	  year = 'Calender year that freshman entered university';
run;

/***/
proc sort data = temp out = totalyears;
by year;
run;
/**
proc print data=totalyears;
run;

/***/
proc means data=totalyears n mean stderr;
var year;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output is:&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="Screen Shot 2019-12-16 at 1.01.01 PM.png" style="width: 432px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34845i1DA7A4BCA23D67A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-12-16 at 1.01.01 PM.png" alt="Screen Shot 2019-12-16 at 1.01.01 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want the output to be the different years and the mean of gpa for each year.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 21:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sort/m-p/612215#M76832</guid>
      <dc:creator>ivethguzman</dc:creator>
      <dc:date>2019-12-16T21:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sort/m-p/612225#M76833</link>
      <description>&lt;P&gt;You don't need PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=totalyears n mean stderr;
    class year;
    var gpa;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Dec 2019 21:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sort/m-p/612225#M76833</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-16T21:26:39Z</dc:date>
    </item>
  </channel>
</rss>

