<?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: how to apply format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497432#M131843</link>
    <description>&lt;P&gt;Format ranges ALWAYS go from smaller to larger&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you might want to test your format with some other values to see if it does what you intend.&lt;/P&gt;
&lt;PRE&gt;data ex1 ;
input group $ amount ;
cards ;
a 9848975
b 9457890
c 1234567898
d 123
;
proc format library=work ;
picture pic low-high='999,9999 -rs/-' ;
run;
data ex2 ;
set ex1 ;
format amount pic. ;
run;&lt;/PRE&gt;
&lt;P&gt;See if the results for group c and d match expectation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS you forgot the $ in your input statement so your example data has a missing group numeric value.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Sep 2018 15:26:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-09-20T15:26:43Z</dc:date>
    <item>
      <title>how to apply format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497282#M131755</link>
      <description>&lt;P&gt;data ex1 ;&lt;BR /&gt;input group amount ;&lt;BR /&gt;cards ;&lt;BR /&gt;a 9848975&lt;BR /&gt;b 9457890&lt;BR /&gt;;&lt;BR /&gt;proc format ;&lt;BR /&gt;picture pic high-low='999,9999 -rs/-' ;&lt;BR /&gt;run;&lt;BR /&gt;data ex2 ;&lt;BR /&gt;set ex1 ;&lt;BR /&gt;format amount pic. ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if run above program it doesn't work can you give correct program&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 08:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497282#M131755</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2018-09-20T08:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to apply format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497284#M131756</link>
      <description>&lt;P&gt;Maxim 2 - Read the log.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format;
  picture pic
    low-high='999,9999 -rs/-';
run;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Please use the code window, it is the {i} above post area, to post code, and please mark answered questions as answered.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 09:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497284#M131756</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-20T09:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to apply format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497432#M131843</link>
      <description>&lt;P&gt;Format ranges ALWAYS go from smaller to larger&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you might want to test your format with some other values to see if it does what you intend.&lt;/P&gt;
&lt;PRE&gt;data ex1 ;
input group $ amount ;
cards ;
a 9848975
b 9457890
c 1234567898
d 123
;
proc format library=work ;
picture pic low-high='999,9999 -rs/-' ;
run;
data ex2 ;
set ex1 ;
format amount pic. ;
run;&lt;/PRE&gt;
&lt;P&gt;See if the results for group c and d match expectation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS you forgot the $ in your input statement so your example data has a missing group numeric value.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 15:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-apply-format/m-p/497432#M131843</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-20T15:26:43Z</dc:date>
    </item>
  </channel>
</rss>

