<?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: Reporting large numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874926#M345703</link>
    <description>&lt;P&gt;To format frequencies in a one-way frequency table, you can use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_038/procstat/procstat_freq_syntax08.htm#procstat.freq.freqoneway" target="_self"&gt;ONEWAY(FORMAT=)&lt;/A&gt; option in the TABLES statement.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=sas.dosemed_all; 
    tables ScheduleType / oneway(format=comma14.);
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 10 May 2023 13:11:29 GMT</pubDate>
    <dc:creator>Watts</dc:creator>
    <dc:date>2023-05-10T13:11:29Z</dc:date>
    <item>
      <title>Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874751#M345629</link>
      <description>&lt;P&gt;I have a very large number in a frequency table which SAS is abbreviating in the output as below. How can i get SAS to report all the digits?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 506px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83759iFAEBE43BDF9248BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 20:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874751#M345629</guid>
      <dc:creator>bayzid</dc:creator>
      <dc:date>2023-05-09T20:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874762#M345633</link>
      <description>&lt;P&gt;see &lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0404-2017.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings17/SAS0404-2017.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And hint hint hint for next time, I think you will get faster answers if you do a simple search first. I found that via a simple internet search for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to change formats in PROC FREQ&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which took me less time than it takes to write a post here.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 21:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874762#M345633</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-09T21:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874784#M345645</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108705"&gt;@bayzid&lt;/a&gt;&amp;nbsp;, You need to mention format after forward "table vars / "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;format=comma14. &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer this simple example where I've created 1B rows with same value (A++). It means when I run proc freq without any format, I'll also get the same value in hexadecimal format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* create a new dataset with 1B rows*/
data OneBillionRows (keep=rank);
	do i=1 to 1000000000;
		rank='A++';
		output;
	end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;PROC FREQ without Format:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=OneBillionRows;
   tables Rank*Rank / list all  ; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MayurJadhav_1-1683669241494.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83767i9B2F3D44B8B8857B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MayurJadhav_1-1683669241494.png" alt="MayurJadhav_1-1683669241494.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC FREQ with FORMAT&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=OneBillionRows;
   tables Rank*Rank / list all  format=comma14. ; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MayurJadhav_0-1683669180388.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83766i77B58C9837F29EE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MayurJadhav_0-1683669180388.png" alt="MayurJadhav_0-1683669180388.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 21:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874784#M345645</guid>
      <dc:creator>MayurJadhav</dc:creator>
      <dc:date>2023-05-09T21:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874807#M345661</link>
      <description>&lt;P&gt;Thanks very much.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 01:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874807#M345661</guid>
      <dc:creator>BayzidurRahman</dc:creator>
      <dc:date>2023-05-10T01:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874824#M345668</link>
      <description>&lt;P&gt;I am using the following code but still the same result.&lt;BR /&gt;proc freq data=sas.dosemed_all; tables ScheduleType/list all format=comma14.; run;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 04:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874824#M345668</guid>
      <dc:creator>bayzid</dc:creator>
      <dc:date>2023-05-10T04:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874909#M345700</link>
      <description>Customized CrossTabFreqs Template&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/n1sbdyv873pfcmn1e3a8p2z4k055.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/n1sbdyv873pfcmn1e3a8p2z4k055.htm&lt;/A&gt;</description>
      <pubDate>Wed, 10 May 2023 12:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874909#M345700</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-05-10T12:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874926#M345703</link>
      <description>&lt;P&gt;To format frequencies in a one-way frequency table, you can use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_038/procstat/procstat_freq_syntax08.htm#procstat.freq.freqoneway" target="_self"&gt;ONEWAY(FORMAT=)&lt;/A&gt; option in the TABLES statement.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc freq data=sas.dosemed_all; 
    tables ScheduleType / oneway(format=comma14.);
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 May 2023 13:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874926#M345703</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2023-05-10T13:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874928#M345704</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;14799  proc freq data=sas.dosemed_all;
14800      tables ScheduleType / oneway(format=comma14.);
                                 ------                -
                                 22                    22
                                 202                   200
ERROR 22-322: Syntax error, expecting one of the following: ;, AGREE, ALL, ALPHA, BDT, BIN,
              BINOMIAL, CELLCHI2, CHISQ, CL, CMH, CMH1, CMH2, COMMONRISKDIFF, COMONMRDIFF,
              CONTENTS, CONVERGE, CROSSLIST, CUMCOL, DEVIATION, EXACT, EXPECTED, FISHER,
              FORMAT, GAILSIMON, GS, JT, KAPPA, LINE, LIST, MAXITER, MAXLEVELS, MEASURES,
              MISSING, MISSPRINT, NOCOL, NOCUM, NOFREQ, NOPERCENT, NOPRINT, NOROW, NOSPARSE,
              NOWARN, ODDSRATIO, OR, OUT, OUTCUM, OUTEXPECT, OUTPCT, PEARSONRES, PEARSONRESID,
              PLCORR, PLOTS, PRINTKWTS, PRINTWTS, RELRISK, RISKDIFF, SCORE, SCORES, SCOROUT,
              SENSPEC, SPARSE, STDRES, STDRESID, TABLE, TESTF, TESTP, TOTPCT, TREND, WARN.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
ERROR 200-322: The symbol is not recognized and will be ignored.
14801  run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 May 2023 13:15:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874928#M345704</guid>
      <dc:creator>BayzidurRahman</dc:creator>
      <dc:date>2023-05-10T13:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874943#M345706</link>
      <description>&lt;P&gt;The &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_038/procstat/procstat_freq_syntax08.htm#procstat.freq.freqoneway" target="_self"&gt;ONEWAY(FORMAT=)&lt;/A&gt; option is available in PROC FREQ beginning in release 2020.1 (Viya 4).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, you can change the format of frequencies in one-way tables by modifying the template. There's an example in&amp;nbsp;&lt;A href="http://support.sas.com/kb/37/442.html" target="_self"&gt;Usage Note 37442: Modifying the OneWayFreqs template&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 13:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874943#M345706</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2023-05-10T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting large numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874964#M345716</link>
      <description>&lt;P&gt;As explained by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270201"&gt;@Watts&lt;/a&gt;,&amp;nbsp;Base.Freq.OneWayFreqs can solve this formatting problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the same example adjusted according to what you're looking for!&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108705"&gt;@bayzid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods path reset;
ods path (prepend) work.templat(update);
ods path show;

proc template;
   edit Base.Freq.OneWayFreqs; column Line FVariable FListVariable Variable Frequency
        TestFrequency Percent TestPercent CumFrequency CumPercent;
      edit frequency;
         format=comma14.;
      end;
      edit percent;
         format=8.3;
      end;
   end;
run;
proc freq data=OneBillionRows;
   tables Rank / list all nocum  ; 
run;

proc template;
   delete Base.Freq.OneWayFreqs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MayurJadhav_0-1683728809847.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83814iA0FB701D8020A3ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MayurJadhav_0-1683728809847.png" alt="MayurJadhav_0-1683728809847.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 14:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reporting-large-numbers/m-p/874964#M345716</guid>
      <dc:creator>MayurJadhav</dc:creator>
      <dc:date>2023-05-10T14:27:01Z</dc:date>
    </item>
  </channel>
</rss>

