<?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: what is the exact range for FORMAT VALUE statement? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482231#M124863</link>
    <description>&lt;P&gt;I really don't understand the question.&lt;/P&gt;
&lt;P&gt;Values that are not covered by any of the ranges in the format are displayed normally instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Jul 2018 03:26:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-07-29T03:26:13Z</dc:date>
    <item>
      <title>what is the exact range for FORMAT VALUE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482228#M124862</link>
      <description>&lt;P&gt;Hi, I'm trying to understand the exact range for a format value statement.&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data courses;
	input exam;
	datalines;
	0.5
	1
	1.5
	49.5
	50
	50.5
	51
	51.5
	52
	;
run;

proc format;
	value score  1-50 = 'Fail'
		    51-100 = 'Pass';
run;
proc report data = courses nowd;
column exam;
define exam / display format = score.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The complied result is:&lt;BR /&gt;&amp;nbsp;0.5 -&amp;gt; 0.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;1 -&amp;gt; fail&lt;/P&gt;&lt;P&gt;&amp;nbsp;1.5 -&amp;gt; fail&lt;/P&gt;&lt;P&gt;&amp;nbsp;49.5 -&amp;gt; fail&lt;/P&gt;&lt;P&gt;&amp;nbsp;50 -&amp;gt; fail&lt;/P&gt;&lt;P&gt;&amp;nbsp;50.5 -&amp;gt; 50.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;51 -&amp;gt; pass&lt;/P&gt;&lt;P&gt;&amp;nbsp;51.5 -&amp;gt; pass&lt;/P&gt;&lt;P&gt;&amp;nbsp;52 -&amp;gt; pass&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, it's not hard to conclude that the range '1-50' is identical to 1 &amp;lt;= somewhere &amp;lt;= 50,&lt;/P&gt;&lt;P&gt;in a similar vein, 51-100 can be interpreted as 51 &amp;lt;= somewhere &amp;lt;= 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but, when I change the above program to this (second range was modified):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value score 1-50 = 'Fail'
		    50-100 = 'Pass';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;while the first range covers the identical range (1 &amp;lt;= somewhere &amp;lt;= 50), the second one changes, covering: 50&amp;lt;somewhere &amp;lt;=100.&lt;/P&gt;&lt;P&gt;The second range does not cover 50.&lt;/P&gt;&lt;P&gt;Although this may be natural when ranges are specified consecutively and continuously, this is confusing.&lt;/P&gt;&lt;P&gt;Can anyone tell me why the complier interpretes this way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 03:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482228#M124862</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2018-07-29T03:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: what is the exact range for FORMAT VALUE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482231#M124863</link>
      <description>&lt;P&gt;I really don't understand the question.&lt;/P&gt;
&lt;P&gt;Values that are not covered by any of the ranges in the format are displayed normally instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 03:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482231#M124863</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-29T03:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: what is the exact range for FORMAT VALUE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482234#M124864</link>
      <description>Hi Tom, question was:&lt;BR /&gt;when format range is declared as 1-50, 51-100, then the value 50 is, of course, part of range 1-50.&lt;BR /&gt;&lt;BR /&gt;Now, when format range is declared as 1-50, 50-100, then the value 50 is, part of range 1-50.&lt;BR /&gt;Why is that? Why not part of 50-100 range?</description>
      <pubDate>Sun, 29 Jul 2018 03:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482234#M124864</guid>
      <dc:creator>jimmychoi</dc:creator>
      <dc:date>2018-07-29T03:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: what is the exact range for FORMAT VALUE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482237#M124865</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215463"&gt;@jimmychoi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Tom, question was:&lt;BR /&gt;when format range is declared as 1-50, 51-100, then the value 50 is, of course, part of range 1-50.&lt;BR /&gt;&lt;BR /&gt;Now, when format range is declared as 1-50, 50-100, then the value 50 is, part of range 1-50.&lt;BR /&gt;Why is that? Why not part of 50-100 range?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because that is how SAS designed it to behave.&amp;nbsp; If you want to control which range the dividing value belongs to use the &amp;lt; symbol to exclude it from one of them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n03qskwoints2an1ispy57plwrn9.htm&amp;amp;locale=en#n03qskwoints2an1ispy57plwrn9" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=n03qskwoints2an1ispy57plwrn9.htm&amp;amp;locale=en#n03qskwoints2an1ispy57plwrn9&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jul 2018 04:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482237#M124865</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-29T04:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: what is the exact range for FORMAT VALUE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482260#M124873</link>
      <description>&lt;P&gt;That is the way sas do . If you want include 50 too, add an option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value score(multilabel)  1-50 = 'Fail'
		    50-100 = 'Pass';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Jul 2018 10:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482260#M124873</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-29T10:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: what is the exact range for FORMAT VALUE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482497#M124993</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215463"&gt;@jimmychoi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Tom, question was:&lt;BR /&gt;when format range is declared as 1-50, 51-100, then the value 50 is, of course, part of range 1-50.&lt;BR /&gt;&lt;BR /&gt;Now, when format range is declared as 1-50, 50-100, then the value 50 is, part of range 1-50.&lt;BR /&gt;Why is that? Why not part of 50-100 range?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In previous versions of SAS that format with 50 in both ranges would have generated an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;There are&amp;nbsp;2 characters involved with ranges: -&amp;nbsp;&amp;lt; .&amp;nbsp; - by itself includes the end values. If you use&amp;nbsp; 50 &amp;lt;- 100 then you are using "greater than but not equal to 50 up to and including 100", 50 -&amp;lt; 100 is using "50 to but not including 100" and 50&amp;lt; - &amp;lt;100 is "between 50 and 100 excluding 100 and 50". This last might be of use if you want to assign something like: 100= 'Perfect'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your initial format did not assign formatted values to anything between 50 and 51. Perhaps you wanted&lt;/P&gt;
&lt;P&gt;50&amp;lt;- 100.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 15:12:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-exact-range-for-FORMAT-VALUE-statement/m-p/482497#M124993</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-30T15:12:12Z</dc:date>
    </item>
  </channel>
</rss>

