<?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 freq or proc sql which one should I select? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843098#M36554</link>
    <description>&lt;P&gt;Could you please provide data as &lt;FONT color="#FF0000"&gt;working&lt;/FONT&gt; SAS data step code (as you did &lt;A href="https://communities.sas.com/t5/New-SAS-User/Accounts-looping-in-the-same-category/m-p/838428#M36233" target="_self"&gt;here&lt;/A&gt;)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either SQL or FREQ ought to work here. FREQ may require some data step manipulation to get there.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 12:35:54 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-11-08T12:35:54Z</dc:date>
    <item>
      <title>Proc freq or proc sql which one should I select?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843081#M36553</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am trying to find which previousrepcode has moved to paying accountstatus from the below sample table. I want to get a table which shows the count of how many 122, 168, 157, etc repcodes are in the paying accountstatus. I am confused to use the proc freq to get this information or proc sql. I have used the below code and this gives me information about the previousrepcode and paying_repcode. I want to count how many times 168, 122 etc are in paying. Thanks&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;AccountNumber	PreviousRepCode	nextstatus	dt_curbal	DateAccountMoved	Sector	accountstatus
321784639	122	005H	145.55	02-Nov-22	Comms	Review
272652868	168	005H	60.72	03-Nov-22	Utilities	Paying
250411519	168	005H	47.09	03-Nov-22	Comms	Review
340751155	122	005H	1186.47	03-Nov-22	Comms	End of cyle
291453173	157	005H	889.12	03-Nov-22	Financial	Paying

proc sql;
create table Paying_info as 
select 
PreviousRepCode,
accountstatus as Paying_repcodes
from out_trace_op_status
where accountstatus like 'Paying';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Nov 2022 10:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843081#M36553</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-11-08T10:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq or proc sql which one should I select?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843098#M36554</link>
      <description>&lt;P&gt;Could you please provide data as &lt;FONT color="#FF0000"&gt;working&lt;/FONT&gt; SAS data step code (as you did &lt;A href="https://communities.sas.com/t5/New-SAS-User/Accounts-looping-in-the-same-category/m-p/838428#M36233" target="_self"&gt;here&lt;/A&gt;)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either SQL or FREQ ought to work here. FREQ may require some data step manipulation to get there.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 12:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843098#M36554</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-11-08T12:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq or proc sql which one should I select?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843114#M36556</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Apologies for that. I have created a test working data and adding it below.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input PreviousRepCode accountstatus;
datalines;
122	Review
168	Paying
168	Review
122	End of cycle
157	Paying
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843114#M36556</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-11-08T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq or proc sql which one should I select?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843117#M36558</link>
      <description>&lt;P&gt;Please be kind enough to test your code first to make sure it works (and fix it if it doesn't work). This code doesn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-freq-or-proc-sql-which-one-should-I-select/m-p/843117#M36558</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-11-08T13:59:38Z</dc:date>
    </item>
  </channel>
</rss>

