<?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 PROC REPORT default= format not working in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455941#M29394</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to default a format of comma20. for values in a proc report but I keep getting the error "expecting one of the following: a name, a format name..."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=one;
columns [some columns];
format default=comma20. sales=dollar30.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table contains character and numeric data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 14:48:13 GMT</pubDate>
    <dc:creator>hulksmash</dc:creator>
    <dc:date>2018-04-20T14:48:13Z</dc:date>
    <item>
      <title>PROC REPORT default= format not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455941#M29394</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to default a format of comma20. for values in a proc report but I keep getting the error "expecting one of the following: a name, a format name..."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=one;
columns [some columns];
format default=comma20. sales=dollar30.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table contains character and numeric data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455941#M29394</guid>
      <dc:creator>hulksmash</dc:creator>
      <dc:date>2018-04-20T14:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT default= format not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455951#M29395</link>
      <description>&lt;P&gt;The general form of a format statement is&lt;/P&gt;
&lt;P&gt;format variablename formatname. ;&lt;/P&gt;
&lt;P&gt;no = used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try:&lt;/P&gt;
&lt;P&gt;format _numeric_ comma20. ;&lt;/P&gt;
&lt;P&gt;_numeric_ is a special list that includes all numeric variables.&lt;/P&gt;
&lt;P&gt;I am not sure if that will work for computed variables though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format sales dollar30.2; after should set the format for that variable as the last defined should prevail.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455951#M29395</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T14:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT default= format not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455952#M29396</link>
      <description>&lt;P&gt;Is default a variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A format statement has a different syntax:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format VariableName format. ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No equal sign and default doesn't apply to anything.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to apply it to all numeric variables you can use the following, but not sure how that would handle the SALES variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format _numeric_ comma20.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455952#M29396</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-20T14:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT default= format not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455960#M29397</link>
      <description>&lt;P&gt;This worked!&amp;nbsp; The documentation was not the&amp;nbsp;best to point out the "Default=" was not the correct syntax&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:11:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455960#M29397</guid>
      <dc:creator>hulksmash</dc:creator>
      <dc:date>2018-04-20T15:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT default= format not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455966#M29398</link>
      <description>You might have been confusing the procedure level Format= option in proc tabulate. You can on the Proc Tabulate statement have Format=comma20. and then that becomes the default for cells of the table(s) displayed. But again the syntax is different as no variable is mentioned.</description>
      <pubDate>Fri, 20 Apr 2018 15:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-REPORT-default-format-not-working/m-p/455966#M29398</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T15:24:54Z</dc:date>
    </item>
  </channel>
</rss>

