<?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: Reformatting negative numeric output to include dash? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681731#M206249</link>
    <description>&lt;P&gt;If you values are not exactly 6 digits and integer then you will need to provide a larger example of values and how they should appear.&lt;/P&gt;
&lt;P&gt;You may also have to provide an example just how you are building your "report".&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2020 19:08:41 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-09-04T19:08:41Z</dc:date>
    <item>
      <title>Reformatting negative numeric output to include dash?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681729#M206247</link>
      <description>&lt;P&gt;I am a SAS novice. I have two fields called P_ADJ_INCOME and S_ADJ_INCOME where the output are negative values like:&amp;nbsp;&amp;nbsp;-000680 and I would like to reformat this output to: 00-0680&lt;/P&gt;&lt;P&gt;for reporting purposes.&lt;/P&gt;&lt;P&gt;I would appreciate your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 18:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681729#M206247</guid>
      <dc:creator>baltes</dc:creator>
      <dc:date>2020-09-04T18:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reformatting negative numeric output to include dash?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681731#M206249</link>
      <description>&lt;P&gt;If you values are not exactly 6 digits and integer then you will need to provide a larger example of values and how they should appear.&lt;/P&gt;
&lt;P&gt;You may also have to provide an example just how you are building your "report".&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 19:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681731#M206249</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-04T19:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reformatting negative numeric output to include dash?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681737#M206252</link>
      <description>&lt;P&gt;In both fields, the output is exactly 6 digits including the dash. They all look like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-005236&lt;BR /&gt;-025450&lt;BR /&gt;-003629&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 19:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681737#M206252</guid>
      <dc:creator>baltes</dc:creator>
      <dc:date>2020-09-04T19:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reformatting negative numeric output to include dash?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681742#M206256</link>
      <description>&lt;P&gt;Use a picture format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
do x = -005236,-025450,-003629,-000077;
    output;
    end;
format x z7.;
run;

proc format;
picture myFormat 
low-high='99-9999';
run;

data want;
set have;
y = x;
format y myFormat.;
run;

proc print data=want; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs. 	x 	y
1 	-005236 	00-5236
2 	-025450 	02-5450
3 	-003629 	00-3629
4 	-000077 	00-0077&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Sep 2020 20:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reformatting-negative-numeric-output-to-include-dash/m-p/681742#M206256</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-09-04T20:23:38Z</dc:date>
    </item>
  </channel>
</rss>

