<?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: using SUM FIELDS option in SORT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/using-SUM-FIELDS-option-in-SORT/m-p/40079#M10365</link>
    <description>Hi:&lt;BR /&gt;
  You may not even need SYNCSORT. PROC FREQ with the NLEVELS option will give you this information. See this previous forum posting. The example output appears before the code that generated the output:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=8711∇" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=8711∇&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 19 Aug 2008 15:17:04 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-08-19T15:17:04Z</dc:date>
    <item>
      <title>using SUM FIELDS option in SORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-SUM-FIELDS-option-in-SORT/m-p/40078#M10364</link>
      <description>Hi,&lt;BR /&gt;
We use SAS under Z/OS environment. I have a requirement to summarize (calculate counts on one or more fields) input file. For example the input file,&lt;BR /&gt;
&lt;BR /&gt;
ID       MNAME      CITY&lt;BR /&gt;
&lt;BR /&gt;
001     SANTA         DENVER&lt;BR /&gt;
002     DERMETT     LAKE CITY&lt;BR /&gt;
001     SANTA         DENVER&lt;BR /&gt;
002     DERMETT     LAKE CITY&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The summarized output will be:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ID    count&lt;BR /&gt;
----------------&lt;BR /&gt;
001   02&lt;BR /&gt;
002   02&lt;BR /&gt;
&lt;BR /&gt;
ID     MNAME     COUNT&lt;BR /&gt;
------------------------------------&lt;BR /&gt;
001  SANTA        002&lt;BR /&gt;
002  DERMETT    002&lt;BR /&gt;
&lt;BR /&gt;
The output shown above is sample only.. need to get unique counts on combination of one or more fields.&lt;BR /&gt;
&lt;BR /&gt;
I thought of doing it in SYNCOSORT SUM FIELDS option but need to execute multiple steps.&lt;BR /&gt;
&lt;BR /&gt;
Could you help me how can I achieve this result in SAS?&lt;BR /&gt;
&lt;BR /&gt;
Can we use SYNCSORT control statements in SAS?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Tue, 19 Aug 2008 14:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-SUM-FIELDS-option-in-SORT/m-p/40078#M10364</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-19T14:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: using SUM FIELDS option in SORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-SUM-FIELDS-option-in-SORT/m-p/40079#M10365</link>
      <description>Hi:&lt;BR /&gt;
  You may not even need SYNCSORT. PROC FREQ with the NLEVELS option will give you this information. See this previous forum posting. The example output appears before the code that generated the output:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=8711∇" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=8711∇&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 19 Aug 2008 15:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-SUM-FIELDS-option-in-SORT/m-p/40079#M10365</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-08-19T15:17:04Z</dc:date>
    </item>
  </channel>
</rss>

