<?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: Identifying negative values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836813#M36112</link>
    <description>&lt;P&gt;Even simpler, use different wording&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PUT "• The number of currently hospitalized patients has changed by &amp;amp;DIF_confirmedcount. (&amp;amp;DIF_bullet3. change) to &amp;amp;bullet3. from the previous reporting day.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Oct 2022 21:03:29 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-10-04T21:03:29Z</dc:date>
    <item>
      <title>Identifying negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836799#M36106</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created an automated report, and I was asked to put in the verbiage (increased/decreased/did not change) on a certain line in the report. I was thinking of doing an if/then statement, but I am still trying to figure out how to identify negative and positive values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The line of code for the report is below. The "increased/decreased/did not change" is dependent on "&amp;amp;DIF_confirmedcount" variable. If the DIF_confirmed out has a negative value, I want it to say "decreased", positive value="increased", and 0="did not change".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;PUT "• The number of currently hospitalized patients (&lt;STRONG&gt;placeholder&lt;/STRONG&gt;) by &amp;amp;DIF_confirmedcount. (&amp;amp;DIF_bullet3. change) to &amp;amp;bullet3. from the previous reporting day.";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 19:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836799#M36106</guid>
      <dc:creator>scolitti1</dc:creator>
      <dc:date>2022-10-04T19:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836800#M36107</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %eval(&amp;amp;dif_confrimendcount&amp;lt;0) %then %let placeholder=decreased;
%else %if %eval(&amp;amp;dif_confrimendcount&amp;gt;0) %then %let placeholder=increased;
%else %let placeholder=did not change;
PUT "• The number of currently hospitalized patients &amp;amp;placeholder by %sysfunc(abs(&amp;amp;DIF_confirmedcount.)) (&amp;amp;DIF_bullet3. change) to &amp;amp;bullet3. from the previous reporting day.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Oct 2022 19:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836800#M36107</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-04T19:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836813#M36112</link>
      <description>&lt;P&gt;Even simpler, use different wording&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PUT "• The number of currently hospitalized patients has changed by &amp;amp;DIF_confirmedcount. (&amp;amp;DIF_bullet3. change) to &amp;amp;bullet3. from the previous reporting day.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836813#M36112</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-04T21:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836814#M36113</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I originally tried this wording, but was asked to add in increase/decrease/did not change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836814#M36113</guid>
      <dc:creator>scolitti1</dc:creator>
      <dc:date>2022-10-04T21:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836817#M36114</link>
      <description>&lt;P&gt;A great example of micro-managing, which unfortunately I have run into as well. Very frustrating.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836817#M36114</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-04T21:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying negative values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836820#M36115</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/386127"&gt;@scolitti1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created an automated report, and I was asked to put in the verbiage (increased/decreased/did not change) on a certain line in the report. I was thinking of doing an if/then statement, but I am still trying to figure out how to identify negative and positive values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The line of code for the report is below. The "increased/decreased/did not change" is dependent on "&amp;amp;DIF_confirmedcount" variable. If the DIF_confirmed out has a negative value, I want it to say "decreased", positive value="increased", and 0="did not change".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;PUT "• The number of currently hospitalized patients (&lt;STRONG&gt;placeholder&lt;/STRONG&gt;) by &amp;amp;DIF_confirmedcount. (&amp;amp;DIF_bullet3. change) to &amp;amp;bullet3. from the previous reporting day.";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Personally think that you have left a great many details. I am &lt;STRONG&gt;assuming &lt;/STRONG&gt;that since you are using PUT that perhaps you are using a data step to write this. In which case it &lt;STRONG&gt;may&lt;/STRONG&gt; be possible to use a FORMAT assigned to the variable (assuming one is actually used)&lt;/P&gt;
&lt;P&gt;This is trivial example.&lt;/P&gt;
&lt;PRE&gt;proc format ;
value change
low-&amp;lt;0='decreased'
0     ='no change'
0&amp;lt;-high= 'increased'
;

data _null_;
   input x;
   put "The count of something " x change. " by " x "some following boiler plate";
datalines;
-34
0
15
0.00001
-999999999
;&lt;/PRE&gt;
&lt;P&gt;Which creates output&lt;/P&gt;
&lt;PRE&gt;The count of something decreased by -34 some following boiler plate
The count of something no change by 0 some following boiler plate
The count of something increased by 15 some following boiler plate
The count of something increased by 0.00001 some following boiler plate
The count of something decreased by -999999999 some following boiler plate

&lt;/PRE&gt;
&lt;P&gt;If this is not applicable then show some details.&lt;/P&gt;
&lt;P&gt;Note that if the variable name is held in a macro variable you can replace the X that I used with the macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 22:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Identifying-negative-values/m-p/836820#M36115</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-04T22:17:37Z</dc:date>
    </item>
  </channel>
</rss>

