<?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: Numeric format with spaces in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983671#M379544</link>
    <description>&lt;P&gt;I edited your post.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Feb 2026 09:47:04 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2026-02-18T09:47:04Z</dc:date>
    <item>
      <title>Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983621#M379532</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if there is a numeric format with spaces. I apply the format&amp;nbsp;comma10.2 and, for example, my result is&amp;nbsp; 673,380.10, I would like to have&amp;nbsp;673 380.10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;[KB] Edit: changed "without" to "with"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV id="IDX"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Feb 2026 09:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983621#M379532</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2026-02-18T09:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983623#M379533</link>
      <description>&lt;P&gt;Why?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 15:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983623#M379533</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-02-17T15:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983624#M379534</link>
      <description>&lt;P&gt;You will need to make your own using PROC FORMAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture spaces (default=10)
 -99999.99-&amp;lt;0 ='00 009.99' (prefix='-')
 0-999999.99 ='000 009.99'
 other=[best10.2]
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you test it out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  input x @@;
  y=x ;
  format x comma10.2 y spaces.;
cards;
123456.78  0 1 10 100 1000 10000 -1 -10 -1000
;

proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Feb 2026 15:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983624#M379534</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-02-17T15:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983625#M379535</link>
      <description>Thank you, Tom,&lt;BR /&gt;Could you explain me  0-999999.99 and '000 009.99' because I need to do the same things for comma22.4 and comma16.2 format. Thank you!</description>
      <pubDate>Tue, 17 Feb 2026 16:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983625#M379535</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2026-02-17T16:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983627#M379536</link>
      <description>&lt;P&gt;Each 0 or 9 indicates where the digits should be placed.&amp;nbsp; When you use 9 the digit is always printed even when it is zero.&amp;nbsp; But when you use 0 the zero digits are printed as spaces.&amp;nbsp; So by ending it with 09.99 it will always print the ones place and the tenths and hundreds places.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the first range I tried to pick the largest magnitude negative number that could print in N characters as the lower bound and used open ended upper bound of zero.&amp;nbsp; And used the PREFIX= option to get it to print the hyphen.&amp;nbsp; Remember to leave room for the hyphen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second range I used zero as the lower bound and the upper bound was the largest number that could appear in N spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you should also look at the ROUND option on the format definition. I believe that without that picture formats will truncate the values.&amp;nbsp; So 1.347 will print as 1.34 instead of 1.35.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So with rounding in place&amp;nbsp;I doubt that the values I picked are exactly the right lower and upper bounds.&amp;nbsp; So you might need to experiment to determine what boundaries will work for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or perhaps you are certain your actual values will never approach those extremes and so do not need to worry about it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 16:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983627#M379536</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-02-17T16:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983629#M379537</link>
      <description>Thank you Tom!</description>
      <pubDate>Tue, 17 Feb 2026 16:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983629#M379537</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2026-02-17T16:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983658#M379538</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if there is a numeric format without spaces. I apply the format&amp;nbsp;comma10.2 and, for example, my result is&amp;nbsp; 673,380.10, I would like to have&amp;nbsp;673 380.10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV id="IDX"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have to say that your comment about "without spaces" confuses me because you say that you "like to have 673 380.10"&amp;nbsp; which clearly has a space between the threes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 23:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983658#M379538</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2026-02-17T23:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983663#M379541</link>
      <description>&lt;P&gt;You could try SAS built-in format NLNUM.&amp;nbsp; if your local zone support it .&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2026 03:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983663#M379541</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-02-18T03:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983665#M379542</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You could try SAS built-in format NLNUM.&amp;nbsp; if your local zone support it .&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I tried that and did not find any locale that used spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename code temp;
filename log2 temp;

data _null_;
  set sashelp.vlocale;
  file code ;
  put 'options ' locale= :$quote. ';run;'
      '%put ' locale :$quote. '=%qsysfunc(putn(123456.78,nlnum10.2));'
  ;
run;
options nosource nonotes ps=200;
proc printto log=log2 ;run;
%include code /nosource2 ;
proc printto log=log; run;
options source notes locale=en_US;

data locale;
  infile log2 dsd truncover dlm='=' ;
  input locale :$30. string :$10. ;
run;

proc freq;
 tables string ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-02-17 at 11.00.10 PM.png" style="width: 542px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113218i91718491A96AFFDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-02-17 at 11.00.10 PM.png" alt="Screenshot 2026-02-17 at 11.00.10 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2026 04:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983665#M379542</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-02-18T04:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983670#M379543</link>
      <description>Hello Ballardw,&lt;BR /&gt;&lt;BR /&gt;"With" spaces. Unfortunately, I can not modify my message.</description>
      <pubDate>Wed, 18 Feb 2026 08:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983670#M379543</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2026-02-18T08:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983671#M379544</link>
      <description>&lt;P&gt;I edited your post.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2026 09:47:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983671#M379544</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2026-02-18T09:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983672#M379545</link>
      <description>Thank you, Kurt!</description>
      <pubDate>Wed, 18 Feb 2026 09:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983672#M379545</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2026-02-18T09:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983717#M379555</link>
      <description>&lt;P&gt;Actually there are some but they use non-breaking space instead of space.&amp;nbsp; So when using ENCODING=UTF8 you will need to make the width of the format specification larger because it takes two bytes to store a non-breaking space with that encoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason they did not appear in my earlier test is because the NLNUM format will remove the thousand separators when it needs more room to display the number in the required width.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename code temp;
filename log2 temp;

data _null_;
  set sashelp.vlocale;
  file code ;
  put 'options ' locale= :$quote. ';run;'
      '%put ' locale :$quote. '=%qsysfunc(putn(123456.78,nlnum14.2));'
  ;
run;
options nosource nonotes ps=200;
proc printto log=log2 ;run;
%include code /nosource2 ;
proc printto log=log; run;
options source notes locale=en_US;

data locale;
  infile log2 dsd truncover dlm='=' ;
  input locale :$30. string :$14. ;
run;

proc freq;
 tables string ;
run;

proc print ;
where index(string,'C2A0'x);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-02-18 at 1.41.52 PM.png" style="width: 501px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113237i646EE72BFAD1CBDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-02-18 at 1.41.52 PM.png" alt="Screenshot 2026-02-18 at 1.41.52 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2026 18:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983717#M379555</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-02-18T18:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983727#M379558</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; ,&lt;BR /&gt;You are always impressed to me . Thumbs Up!</description>
      <pubDate>Thu, 19 Feb 2026 03:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983727#M379558</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-02-19T03:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983731#M379562</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hello Ballardw,&lt;BR /&gt;&lt;BR /&gt;"With" spaces. Unfortunately, I can not modify my message.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You should be able to edit any of the posts you have made. There should be a block of three lines next to the subject of the post. Roll your cursor over the block of lines and and "edit message" or "edit reply" should appear. Click and the edit option opens the message or reply.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2026 04:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983731#M379562</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2026-02-19T04:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric format with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983735#M379564</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;You should be able to edit any of the posts you have made.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While Super Users like you deservedly&amp;nbsp;&lt;A href="https://communities.sas.com/t5/All-Things-Community/Can-t-edit-my-own-post-a-few-minutes-later/m-p/809290/highlight/true#M4629" target="_blank" rel="noopener"&gt;enjoy this elevated privilege&lt;/A&gt;, the rest of us have been allowed, since 2022, only a limited time window ("&lt;SPAN&gt;&lt;A href="https://communities.sas.com/t5/All-Things-Community/Can-t-edit-my-own-post-a-few-minutes-later/m-p/809443/highlight/true#M4636" target="_blank" rel="noopener"&gt;within a day of posting&lt;/A&gt;") to edit our posts.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2026 10:23:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-format-with-spaces/m-p/983735#M379564</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2026-02-19T10:23:23Z</dc:date>
    </item>
  </channel>
</rss>

