<?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 Picture Format - Adding a Prefix to non-integers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471229#M285726</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I found &lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/409475#M26245" target="_self"&gt;this&lt;/A&gt; very helpful post on how to add a prefix like '+' to values, but found, as the last reply to&amp;nbsp;that post suggests, that it doesn't work for non-integers like 0.1. I guess this&amp;nbsp;has something to do with the fact that&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0n990vq8gxca6n1vnsracr6jp2c.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p178ak2xepxr20n1302iaaxmkjgi" target="_self"&gt;"&lt;SPAN&gt;The prefix is placed in front of the value's first significant digit&lt;/SPAN&gt;&lt;/A&gt;" (documentation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So&amp;nbsp;my question is how do I get values like 0.1 to display like +0.1 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc format;
	picture test
	0&amp;lt;-high= '0.0' (prefix='+');
run;

data hello;
input x;
cards;
0.1
;
run;

data _null_;
	set hello;
	call symputx('whatever',put(x,test.)); 
run;

%put &amp;amp;whatever.;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I get&amp;nbsp;+1, but am trying to get +0.1. The Fill option just gives me something like 0+1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would appreciate any tips.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jun 2018 20:54:16 GMT</pubDate>
    <dc:creator>sm4</dc:creator>
    <dc:date>2018-06-18T20:54:16Z</dc:date>
    <item>
      <title>Picture Format - Adding a Prefix to non-integers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471229#M285726</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I found &lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Numeric-Format-add-positive-sign-to-values/m-p/409475#M26245" target="_self"&gt;this&lt;/A&gt; very helpful post on how to add a prefix like '+' to values, but found, as the last reply to&amp;nbsp;that post suggests, that it doesn't work for non-integers like 0.1. I guess this&amp;nbsp;has something to do with the fact that&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0n990vq8gxca6n1vnsracr6jp2c.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p178ak2xepxr20n1302iaaxmkjgi" target="_self"&gt;"&lt;SPAN&gt;The prefix is placed in front of the value's first significant digit&lt;/SPAN&gt;&lt;/A&gt;" (documentation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So&amp;nbsp;my question is how do I get values like 0.1 to display like +0.1 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc format;
	picture test
	0&amp;lt;-high= '0.0' (prefix='+');
run;

data hello;
input x;
cards;
0.1
;
run;

data _null_;
	set hello;
	call symputx('whatever',put(x,test.)); 
run;

%put &amp;amp;whatever.;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I get&amp;nbsp;+1, but am trying to get +0.1. The Fill option just gives me something like 0+1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would appreciate any tips.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 20:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471229#M285726</guid>
      <dc:creator>sm4</dc:creator>
      <dc:date>2018-06-18T20:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Format - Adding a Prefix to non-integers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471232#M285727</link>
      <description>&lt;P&gt;Make a couple of changes to your format definition ... including leaving room for the prefix:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc format;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;picture test 0&amp;lt;-high= ' 9.0' (prefix='+');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may still have difficulty with larger numbers, but this will take care of the case that you asked about.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 21:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471232#M285727</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-18T21:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Format - Adding a Prefix to non-integers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471253#M285728</link>
      <description>&lt;P&gt;Thank you! Worked perfectly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So....if I change to&amp;nbsp;0&amp;lt;-high= ' 10.0' (prefix='+');, then I can make it work for values like 15.1...but this adds an extra 0 for 0.1, giving me +00.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way I can make it work for a whole range of values (0.1 --&amp;gt; +0.1, 15.5 --&amp;gt; +15.5, 100.3 --&amp;gt; +100.3, same for negatives)? I.e., keep the number as it would have been otherwise, but just add a prefix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 22:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471253#M285728</guid>
      <dc:creator>sm4</dc:creator>
      <dc:date>2018-06-18T22:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Format - Adding a Prefix to non-integers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471257#M285729</link>
      <description>&lt;P&gt;You would need to define each order of magnitude as a separate range:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;0-&amp;lt;10 = ' 9.0' (prefix='+')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;10-&amp;lt;100 = ' 90.0' (prefix='+')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 23:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471257#M285729</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-18T23:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Format - Adding a Prefix to non-integers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471275#M285730</link>
      <description>Thank you!!!</description>
      <pubDate>Tue, 19 Jun 2018 00:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Picture-Format-Adding-a-Prefix-to-non-integers/m-p/471275#M285730</guid>
      <dc:creator>sm4</dc:creator>
      <dc:date>2018-06-19T00:54:50Z</dc:date>
    </item>
  </channel>
</rss>

