<?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: Issues with quot;Replace a range of valuesquot; in EG 3.0 and 4.1 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2625#M863</link>
    <description>Your statement:&lt;BR /&gt;
"the upper limit and the lower limit are overlapping &amp;lt;= 10 is the same as 10&amp;lt;="&lt;BR /&gt;
&lt;BR /&gt;
is not true as 10 will be captured by &amp;lt;=10 and not by 10&amp;lt;=.&lt;BR /&gt;
&lt;BR /&gt;
I don't think you need to change your original code to cope with very precise ages!&lt;BR /&gt;
&lt;BR /&gt;
..........Phil</description>
    <pubDate>Tue, 27 Mar 2007 21:01:33 GMT</pubDate>
    <dc:creator>prholland</dc:creator>
    <dc:date>2007-03-27T21:01:33Z</dc:date>
    <item>
      <title>Issues with "Replace a range of values" in EG 3.0 and 4.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2622#M860</link>
      <description>Hello&lt;BR /&gt;
&lt;BR /&gt;
I'm doing an evaluation of SAS Enterprise Guide, to test if it can be used to teach Students and I ran into a problem when I try to replace a range of values.&lt;BR /&gt;
The problem consists in both Versions EG3.0 and Learning Edition EG4.1. Perheps Im just doing it the wrong way, but I can't find a solution to it.&lt;BR /&gt;
&lt;BR /&gt;
I've got an column "Age", which holds the very precise age of Patients, like (14.753424658). Now I have to make a new group column. Patients between the age 5 to 10 get a new value "Child", age 10 to 15 "Teenagers" and so on.&lt;BR /&gt;
The code that the EG creates looks like this:&lt;BR /&gt;
&lt;BR /&gt;
(CASE&lt;BR /&gt;
WHEN 5 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt;= 10 THEN 'Child'&lt;BR /&gt;
WHEN 10 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt;= 15 THEN 'Teen'&lt;BR /&gt;
...&lt;BR /&gt;
ELSE 'NA' END) AS Age_Group&lt;BR /&gt;
&lt;BR /&gt;
As you may see the upper limit and the lower limit are overlapping &amp;lt;= 10 is the same as 10&amp;lt;=&lt;BR /&gt;
But if I change my boundaries, so that they dont overlap:&lt;BR /&gt;
&lt;BR /&gt;
(CASE&lt;BR /&gt;
WHEN 5 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt;= 9 THEN 'Child'&lt;BR /&gt;
WHEN 10 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt;= 14 THEN 'Teen'&lt;BR /&gt;
...&lt;BR /&gt;
ELSE 'NA' END) AS Age_Group&lt;BR /&gt;
&lt;BR /&gt;
Then I'm getting NA (missings), since all the people between 9 and 10 (9.35367847) are left out.&lt;BR /&gt;
&lt;BR /&gt;
Perheps it's not a bug, but a feature.&lt;BR /&gt;
But its a problem for me. I could of course use very precise limits, like:&lt;BR /&gt;
CASE&lt;BR /&gt;
WHEN 5 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt;= 9.999999999 THEN 'Child'&lt;BR /&gt;
WHEN 10 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt;= 14.999999999 THEN 'Teen'&lt;BR /&gt;
...&lt;BR /&gt;
ELSE 'NA' END) AS Age_Group&lt;BR /&gt;
&lt;BR /&gt;
But perheps there is a better alternative?&lt;BR /&gt;
&lt;BR /&gt;
SAS Analyst for example has an extra option to chose between a "&amp;lt;= x &amp;lt;" and "&amp;lt; x &amp;lt;=" logic. But a "&amp;lt;=" on both sides, as the EG creates it, just doesn't make much sense to me.&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
&lt;BR /&gt;
Edit:&lt;BR /&gt;
Perfect would be something like that:&lt;BR /&gt;
&lt;BR /&gt;
(CASE&lt;BR /&gt;
WHEN 5 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt; 10 THEN 'Child'&lt;BR /&gt;
WHEN 10 &amp;lt;= IMPW9568.Age AND IMPW9568.Age &amp;lt; 15 THEN 'Teen'&lt;BR /&gt;
...&lt;BR /&gt;
ELSE 'NA' END) AS Age_Group&lt;BR /&gt;
&lt;BR /&gt;
But creatable with EG.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Tillmann Babik at Mar 26, 2007 6:03 AM&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Tillmann Babik at Mar 26, 2007 6:36 AM

&lt;BR /&gt;
Message was edited by: Tillmann Babik at Mar 26, 2007 6:40 AM&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Mar 2007 09:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2622#M860</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-03-26T09:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with quot;Replace a range of valuesquot; in EG 3.0 and 4.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2623#M861</link>
      <description>I assume you are using the Create Query function in EG to replace values.  That function gives "&amp;lt;=x&amp;lt;=" because it allows you to see every exact value within your dataset.&lt;BR /&gt;
&lt;BR /&gt;
If you want to have the code set up to handle additional updates, complete the 'Replace Values' information and then go back to the 'General' Tab where you can change the EG generated code to the code you actually want (&amp;lt;=x&amp;lt;).</description>
      <pubDate>Mon, 26 Mar 2007 15:15:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2623#M861</guid>
      <dc:creator>rab24</dc:creator>
      <dc:date>2007-03-26T15:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Replace a range of valuesquot; in EG 3.0 and 4.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2624#M862</link>
      <description>Hi Rab24&lt;BR /&gt;
&lt;BR /&gt;
Yes I'm working with the create query function. Actually the only other way I would know is to create a format for it.&lt;BR /&gt;
&lt;BR /&gt;
But your suggestion worked, I must have overlooked that Im able to change the expression afterwards.&lt;BR /&gt;
&lt;BR /&gt;
Thank you</description>
      <pubDate>Tue, 27 Mar 2007 06:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2624#M862</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-03-27T06:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with quot;Replace a range of valuesquot; in EG 3.0 and 4.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2625#M863</link>
      <description>Your statement:&lt;BR /&gt;
"the upper limit and the lower limit are overlapping &amp;lt;= 10 is the same as 10&amp;lt;="&lt;BR /&gt;
&lt;BR /&gt;
is not true as 10 will be captured by &amp;lt;=10 and not by 10&amp;lt;=.&lt;BR /&gt;
&lt;BR /&gt;
I don't think you need to change your original code to cope with very precise ages!&lt;BR /&gt;
&lt;BR /&gt;
..........Phil</description>
      <pubDate>Tue, 27 Mar 2007 21:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issues-with-quot-Replace-a-range-of-values-quot-in-EG-3-0-and-4/m-p/2625#M863</guid>
      <dc:creator>prholland</dc:creator>
      <dc:date>2007-03-27T21:01:33Z</dc:date>
    </item>
  </channel>
</rss>

