<?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: making a variable with overlaping range. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/making-a-variable-with-overlaping-range/m-p/626796#M20436</link>
    <description>&lt;P&gt;Create first a custom format using the multilabel option, for example&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=work;
value foodf (multilabel notsorted)
low-2=1
3-5=2
6-7=3
3-7=4
8-high=5;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now how you would use it depends on the which PROC you will use it for.&amp;nbsp; For further details check out:&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2016/12/16/creating-and-using-multilabel-formats/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sgf/2016/12/16/creating-and-using-multilabel-formats/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2020 03:22:30 GMT</pubDate>
    <dc:creator>ghosh</dc:creator>
    <dc:date>2020-02-24T03:22:30Z</dc:date>
    <item>
      <title>making a variable with overlaping range.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/making-a-variable-with-overlaping-range/m-p/626622#M20399</link>
      <description>&lt;P&gt;I have a variable name food.&lt;/P&gt;&lt;P&gt;food has 8 value labels ranges from 1 to 8.&lt;/P&gt;&lt;P&gt;I want to create a variable called range by using the value level of food.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let us suppose I have the dataset name as diet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data food1;
set work.diet;
if food &amp;lt;=2 then range=1;
else if 3&amp;lt;= food &amp;lt;=5 then range=2;
else if 6&amp;lt;= food &amp;lt;=7 then range=3;
&lt;STRONG&gt;else if 3&amp;lt;= food &amp;lt;=7&amp;nbsp; then range=4;&lt;/STRONG&gt;
else if food&amp;gt;=8 then range=5;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem line &lt;STRONG&gt;6 else if 3&amp;lt;= food &amp;lt;=7 then range=4&lt;/STRONG&gt;&amp;nbsp; is not accounting by sas 9.4 as the value is overlapping while creating range variable.&lt;/P&gt;&lt;P&gt;i want a variable with this overlapping code.&lt;/P&gt;&lt;P&gt;it is creating the value label of range 1 2 3 and 5.&lt;/P&gt;&lt;P&gt;it is not accounting the above-highlighted command.&lt;/P&gt;&lt;P&gt;can anyone help me with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 09:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/making-a-variable-with-overlaping-range/m-p/626622#M20399</guid>
      <dc:creator>BIKI</dc:creator>
      <dc:date>2020-02-22T09:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: making a variable with overlaping range.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/making-a-variable-with-overlaping-range/m-p/626796#M20436</link>
      <description>&lt;P&gt;Create first a custom format using the multilabel option, for example&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=work;
value foodf (multilabel notsorted)
low-2=1
3-5=2
6-7=3
3-7=4
8-high=5;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now how you would use it depends on the which PROC you will use it for.&amp;nbsp; For further details check out:&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2016/12/16/creating-and-using-multilabel-formats/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sgf/2016/12/16/creating-and-using-multilabel-formats/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 03:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/making-a-variable-with-overlaping-range/m-p/626796#M20436</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-02-24T03:22:30Z</dc:date>
    </item>
  </channel>
</rss>

