<?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 filtering a variable with Best12 format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455205#M115122</link>
    <description>&lt;P&gt;If I am filtering a variable with numbers with a "Best12." format, does it matter whether I enclose the filter value in quotes?&amp;nbsp;&amp;nbsp; In other words,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If [varname] = '20'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If [varname]=20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 14:19:37 GMT</pubDate>
    <dc:creator>Batman</dc:creator>
    <dc:date>2018-04-18T14:19:37Z</dc:date>
    <item>
      <title>filtering a variable with Best12 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455205#M115122</link>
      <description>&lt;P&gt;If I am filtering a variable with numbers with a "Best12." format, does it matter whether I enclose the filter value in quotes?&amp;nbsp;&amp;nbsp; In other words,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If [varname] = '20'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If [varname]=20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455205#M115122</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2018-04-18T14:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: filtering a variable with Best12 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455206#M115123</link>
      <description>&lt;P&gt;best is a numeric format, so you cannot use the quotes&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455206#M115123</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-18T14:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: filtering a variable with Best12 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455224#M115132</link>
      <description>&lt;P&gt;That is what I assumed, but the character filter in line 45&amp;nbsp;below&amp;nbsp;seems to work.&amp;nbsp;&amp;nbsp; FYI, I'm asking this mundane question to document steps in a program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;30 data _null_;&lt;/P&gt;&lt;P&gt;31 set test1;&lt;/P&gt;&lt;P&gt;32 put termination_code;&lt;/P&gt;&lt;P&gt;33 run;&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;NOTE: There were 10 observations read from the data set WORK.TEST1.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 The SAS System 10:03 Wednesday, April 18, 2018&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;34&lt;/P&gt;&lt;P&gt;35 proc contents data=test1 noprint out=var_dat;&lt;/P&gt;&lt;P&gt;36 run;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.VAR_DAT has 1 observations and 41 variables.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.04 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.06 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;37&lt;/P&gt;&lt;P&gt;38 data _null_;&lt;/P&gt;&lt;P&gt;39 set var_dat(keep=NAME TYPE LENGTH FORMAT);&lt;/P&gt;&lt;P&gt;40 put _all_;&lt;/P&gt;&lt;P&gt;41 run;&lt;/P&gt;&lt;P&gt;NAME=Termination_Code TYPE=1 LENGTH=8 FORMAT=BEST _ERROR_=0 _N_=1&lt;/P&gt;&lt;P&gt;NOTE: There were 1 observations read from the data set WORK.VAR_DAT.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;42&lt;/P&gt;&lt;P&gt;43 data _null_;&lt;/P&gt;&lt;P&gt;44 set test1;&lt;/P&gt;&lt;P&gt;45 if termination_code='10' then put termination_code;&lt;/P&gt;&lt;P&gt;46 run;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/P&gt;&lt;P&gt;45:22&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;NOTE: There were 10 observations read from the data set WORK.TEST1.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455224#M115132</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2018-04-18T14:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: filtering a variable with Best12 format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455230#M115136</link>
      <description>&lt;P&gt;It didn't quite work, look at your log closely, specifically:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line)&lt;IMG class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" border="0" alt="Smiley Sad" title="Smiley Sad" /&gt;Column).&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;45:22&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The general rule is don't have these in your log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it works, why does it matter?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because then you can't tell the difference between a real error and where you made a decision to convert data.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-a-variable-with-Best12-format/m-p/455230#M115136</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-18T14:49:54Z</dc:date>
    </item>
  </channel>
</rss>

