<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755501#M238418</link>
    <description>&lt;P&gt;When I run the proc sql code&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;title "Overview";&lt;BR /&gt;create table HI AS&lt;BR /&gt;Select customer_id,sum(GRADE) as&lt;FONT color="#339966"&gt; total&lt;/FONT&gt; from RRC1 GROUP BY customer_id;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mean I just sum the grade and put results in the total column.&lt;/P&gt;&lt;P&gt;Here's a screenshot as followed:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-07-20 190037.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61471i47E3E58D64B1A773/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-07-20 190037.png" alt="Screenshot 2021-07-20 190037.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-07-20 190107.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61472i17AD64CD7907B08F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-07-20 190107.png" alt="Screenshot 2021-07-20 190107.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I try to figure out the freq of total, but it still does not work when I rub code as I mention&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;Proc freq data=HI;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Tables total;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;THANK YOU&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 23:08:35 GMT</pubDate>
    <dc:creator>TRESSQ</dc:creator>
    <dc:date>2021-07-20T23:08:35Z</dc:date>
    <item>
      <title>Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/754817#M238117</link>
      <description>&lt;P&gt;Hi, all.&lt;/P&gt;&lt;P&gt;I try to create frequency about the total, but the SAS&amp;nbsp; said the 'total' variable is not found.&lt;/P&gt;&lt;P&gt;Here's my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#00FF00"&gt;proc import datafile="/home/u58991900/sasuser.v94/Rental_credit_Record.csv"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;dbms=csv&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;out=RRC;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;proc import datafile="/home/u58991900/sasuser.v94/Rental_Customer_info.csv"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;dbms=csv&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;out=RCI;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;DATA RRC1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;SET RRC;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;IF STATUS="0" THEN GRADE=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;ELSE IF STATUS="1" THEN GRADE=2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;ELSE IF STATUS="2" THEN GRADE=3;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;ELSE IF STATUS="3" THEN GRADE=4;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;ELSE IF STATUS="4" THEN GRADE=5;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;ELSE IF STATUS="5" THEN GRADE=100;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;ELSE IF STATUS="C" OR STATUS="X" THEN GRADE=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;proc print data=RRC1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;run;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;Select customer_id,sum(GRADE) as total from RRC1 GROUP BY customer_id;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;quit;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;title "GraFreq";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;proc freq;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;tables total;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Is any way I can solve it?&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;ERROR: Variable TOTAL not found.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 05:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/754817#M238117</guid>
      <dc:creator>TRESSQ</dc:creator>
      <dc:date>2021-07-18T05:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755354#M238365</link>
      <description>&lt;P&gt;Add something like&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT face="courier new,courier"&gt;create table TEST as&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; before the &lt;FONT face="courier new,courier"&gt;select&lt;/FONT&gt; statement.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 12:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755354#M238365</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-07-20T12:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755405#M238387</link>
      <description>&lt;P&gt;thanks a lot! I run the code as below:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#00FF00"&gt;proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;title "Overview";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;create table HI AS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;Select customer_id,sum(GRADE) as total from RRC1 GROUP BY customer_id;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;quit;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;It worked!&lt;/P&gt;&lt;P&gt;But when I run the code as followed,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#00FF00"&gt;proc freq data= RRC1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;tables total;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#00FF00"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It said that the &lt;SPAN&gt;ERROR: Variable TOTAL not found.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;should I merge or join the table to 'Rental_credit_Record data' set and run the proc freq data?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Appreciate it!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 16:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755405#M238387</guid>
      <dc:creator>TRESSQ</dc:creator>
      <dc:date>2021-07-20T16:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755492#M238414</link>
      <description>&lt;P&gt;Now. Which table contains the TOTAL variable?&lt;/P&gt;
&lt;P&gt;[the code proc freq was changed compared to when I answered btw, which explains that it doesn't run. Don't do that.]&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 22:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755492#M238414</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-07-20T22:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755501#M238418</link>
      <description>&lt;P&gt;When I run the proc sql code&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;title "Overview";&lt;BR /&gt;create table HI AS&lt;BR /&gt;Select customer_id,sum(GRADE) as&lt;FONT color="#339966"&gt; total&lt;/FONT&gt; from RRC1 GROUP BY customer_id;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mean I just sum the grade and put results in the total column.&lt;/P&gt;&lt;P&gt;Here's a screenshot as followed:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-07-20 190037.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61471i47E3E58D64B1A773/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-07-20 190037.png" alt="Screenshot 2021-07-20 190037.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-07-20 190107.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61472i17AD64CD7907B08F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-07-20 190107.png" alt="Screenshot 2021-07-20 190107.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I try to figure out the freq of total, but it still does not work when I rub code as I mention&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;Proc freq data=HI;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Tables total;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;THANK YOU&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 23:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755501#M238418</guid>
      <dc:creator>TRESSQ</dc:creator>
      <dc:date>2021-07-20T23:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755506#M238423</link>
      <description>&lt;P&gt;&amp;gt;&lt;EM&gt; I try to figure out the freq of total, but it still does not work when I rub code as I mention&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;"does not work" doesn't mean much. The proc freq shown &lt;U&gt;will&lt;/U&gt;&amp;nbsp;give you the frequency of variable TOTAL.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 23:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq/m-p/755506#M238423</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-07-20T23:34:31Z</dc:date>
    </item>
  </channel>
</rss>

