<?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 Code Formatter in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23212#M3617</link>
    <description>is there some advice for "code formatter/beautifier", to help line-up the SAS&lt;BR /&gt;
code, to improve readability in SAS?</description>
    <pubDate>Mon, 07 Mar 2011 16:16:40 GMT</pubDate>
    <dc:creator>Prasad</dc:creator>
    <dc:date>2011-03-07T16:16:40Z</dc:date>
    <item>
      <title>Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23212#M3617</link>
      <description>is there some advice for "code formatter/beautifier", to help line-up the SAS&lt;BR /&gt;
code, to improve readability in SAS?</description>
      <pubDate>Mon, 07 Mar 2011 16:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23212#M3617</guid>
      <dc:creator>Prasad</dc:creator>
      <dc:date>2011-03-07T16:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23213#M3618</link>
      <description>Upgrade to EGuide 4.3.  there is one built in to it.  Check the SAS/Dummy blog archives for an article on it.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://blogs.sas.com/sasdummy/" target="_blank"&gt;http://blogs.sas.com/sasdummy/&lt;/A&gt;</description>
      <pubDate>Mon, 07 Mar 2011 17:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23213#M3618</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-03-07T17:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23214#M3619</link>
      <description>Specific topics on the blog:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://blogs.sas.com/sasdummy/index.php?/archives/188-Hope-for-ugly-programs.html" target="_blank"&gt;http://blogs.sas.com/sasdummy/index.php?/archives/188-Hope-for-ugly-programs.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://blogs.sas.com/sasdummy/index.php?/archives/233-The-SAS-code-formatter-more-than-a-pretty-face.html" target="_blank"&gt;http://blogs.sas.com/sasdummy/index.php?/archives/233-The-SAS-code-formatter-more-than-a-pretty-face.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Enjoy!&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Tue, 08 Mar 2011 21:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23214#M3619</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2011-03-08T21:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23215#M3620</link>
      <description>Hello Chris,&lt;BR /&gt;
&lt;BR /&gt;
BTW, I found that Ctrl+I does not format proc SQL.&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 09 Mar 2011 15:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23215#M3620</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-09T15:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23216#M3621</link>
      <description>It should format PROC SQL, at least with basic indentation.&lt;BR /&gt;
&lt;BR /&gt;
For me, it turns this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sql; &lt;BR /&gt;
create table work.out as &lt;BR /&gt;
select age, &lt;BR /&gt;
(height/weight) as ratio &lt;BR /&gt;
from sashelp.class where age&amp;gt;12; &lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
into this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table work.out as &lt;BR /&gt;
    select age, &lt;BR /&gt;
      (height/weight) as ratio &lt;BR /&gt;
    from sashelp.class where age&amp;gt;12;&lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 15 Mar 2011 12:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23216#M3621</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2011-03-15T12:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23217#M3622</link>
      <description>Hello Chris,&lt;BR /&gt;
&lt;BR /&gt;
This is a real life example. I've got this code from a macro that produces SQL code in LOG (options mprint):&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc SQL;&lt;BR /&gt;
  create view pd as &lt;BR /&gt;
  select &lt;BR /&gt;
  case&lt;BR /&gt;
    when dlq = 1 and iltv=0 and RB &amp;lt; 555 then 100*1+0 when dlq = 1 and iltv=0 and &lt;BR /&gt;
    555 &amp;lt;= RB &amp;lt; 634 then 100*1+1 when dlq = 1 and iltv=0 and 634 &amp;lt;= RB &amp;lt; 672 then 100*1+2 when dlq = 1 and iltv=0 and 672 &amp;lt;= RB then &lt;BR /&gt;
    100*1+3 when dlq = 1 and iltv=1 and RB &amp;lt; 558 then 100*1+50+0 when dlq = 1 and iltv=1 and 558 &amp;lt;= RB &amp;lt; 644 then 100*1+50+1 when dlq = &lt;BR /&gt;
    1 and iltv=1 and 644 &amp;lt;= RB &amp;lt; 707 then 100*1+50+2 when dlq = 1 and iltv=1 and 707 &amp;lt;= RB &amp;lt; 732 then 100*1+50+3 when dlq = 1 and &lt;BR /&gt;
    iltv=1 and 732 &amp;lt;= RB then 100*1+50+4 when dlq = 2 and iltv=0 and RB &amp;lt; 646 then 100*2+0 when dlq = 2 and iltv=0 and 646 &amp;lt;= RB then &lt;BR /&gt;
    100*2+1 when dlq = 2 and iltv=1 and RB &amp;lt; 556 then 100*2+50+0 when dlq = 2 and iltv=1 and 556 &amp;lt;= RB &amp;lt; 631 then 100*2+50+1 when dlq = &lt;BR /&gt;
    2 and iltv=1 and 631 &amp;lt;= RB then 100*2+50+2 when dlq = 3 then 100*dlq when dlq = 4 then 100*dlq when dlq &amp;gt; 4 then 500 else 999&lt;BR /&gt;
  end as pnam label="RC75 RB Pools",&lt;BR /&gt;
  date, SUM(PD*N) as Nb, SUM(N) as N, &lt;BR /&gt;
  SUM(PD*N)/SUM(N)*10000 as bps label="PD, bps" format=6.1,&lt;BR /&gt;
  SUM(Bal) as Bal format 15.0&lt;BR /&gt;
  from _w.ds75_&amp;amp;t     &lt;BR /&gt;
  group by date, pnam&lt;BR /&gt;
  order by date, pnam&lt;BR /&gt;
;quit;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Automatic identation does not help in this case. All Case  clauses are messed.&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Tue, 15 Mar 2011 13:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23217#M3622</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-15T13:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23218#M3623</link>
      <description>Thanks for the example.  No, the formatter doesn't dive deep into these constructs (such as CASE).  But I'll pass this on to the development team!&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Wed, 16 Mar 2011 16:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/23218#M3623</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2011-03-16T16:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Code Formatter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/969819#M46011</link>
      <description>&lt;P&gt;Long time, but has anything come of this? Auto-formatting SQL syntax would make the Formatting feature so much more useful. I regularly use&amp;nbsp;&lt;A href="https://poorsql.com/" target="_blank"&gt;Poor SQL - Instant Free and Open-Source T-SQL Formatting&lt;/A&gt;&amp;nbsp;to do this task, but the tool does not handle ampersand (macro) references or comments well at all.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 20:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-Formatter/m-p/969819#M46011</guid>
      <dc:creator>LukeDalton</dc:creator>
      <dc:date>2025-06-26T20:21:30Z</dc:date>
    </item>
  </channel>
</rss>

