<?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: unknown variable name and conversion to numeric in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87683#M25027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly and without error messages.&lt;/P&gt;&lt;P&gt;From my understanding of the task,&amp;nbsp; "a) check whether var CNT_&amp;amp;STATE is a character or numeric var", was refering to the variable, not its contents specifically as often times character viarbles only contain numeric data.&amp;nbsp; Also, "b) if it is character var then to change it to numeric", by default, if you change a character field to a numeric, you will lose any non-numeric data as it is nolonger compatible in the new datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if he only wanted to change those from character to numeric where it could without data loss, then you could do another check prior to the sql statemes above to trap the character variables that you didn't want converted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2012 16:37:18 GMT</pubDate>
    <dc:creator>byronk</dc:creator>
    <dc:date>2012-04-19T16:37:18Z</dc:date>
    <item>
      <title>unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87675#M25019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a macro that calls several data sets at certain step i use a proc transpose that creates a new variable as follows CNT_&amp;amp;STATE with &amp;amp;STATE (macro variable)and&amp;nbsp; taking values like AON, KAT etc. depending on the input of the initial data set used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subsequently the output data set of the proc transpose is further developed but at this stage I would like to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) check whether var CNT_&amp;amp;STATE is a character or numeric var&lt;/P&gt;&lt;P&gt;b) if it is character var then to change it to numeric &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions more than welcome&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nikos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 12:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87675#M25019</guid>
      <dc:creator>Nikos</dc:creator>
      <dc:date>2012-04-18T12:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87676#M25020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you want to try something like below? you can convert it to numeric without knowing it is a character or numeric variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt; a$ b;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;_a=a*&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;_b=b*&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 12pt;"&gt;1 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 12pt;"&gt;2 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;contents&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 12pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;=have;&lt;/SPAN&gt;&lt;STRONG style="color: navy; font-size: 12pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 12pt;"&gt;Linlin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 12:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87676#M25020</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-18T12:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87677#M25021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And to end up with the same names you started with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have (drop=a b rename=(_a=a _b=b);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This approach can give you notes in the log about character to numeric conversion.&amp;nbsp; If those notes are troublesome to you, there are more complex ways to solve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 13:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87677#M25021</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-18T13:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87678#M25022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be easier to check the variable being transposed and convert it to numeric before it is transposed.&amp;nbsp; Then there is no rename issue.&amp;nbsp; Post some sample data and I will show you what I'm thinking about.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 14:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87678#M25022</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-04-18T14:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87679#M25023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a function you can use to check whether it is character or numeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array x(4) x1-x4;&lt;/P&gt;&lt;P&gt;y=vtype(x(1));&lt;/P&gt;&lt;P&gt;put y=;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 02:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87679#M25023</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-19T02:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87680#M25024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent idea, but with a little confusing example, as you should already know the variable type of your array members before you can define them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;c='c';&lt;/P&gt;&lt;P&gt;n=1;&lt;/P&gt;&lt;P&gt;tc=vtype(c);&lt;/P&gt;&lt;P&gt;tn=vtype(n);&lt;/P&gt;&lt;P&gt;put 'tc=' tc 'tn=' tn;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 12:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87680#M25024</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-19T12:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87681#M25025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try something like this.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;have; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; cnt_sc=&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; cnt_nc=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"1"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; cnt_ga=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"1"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;BR /&gt; cnt_fl=&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;contents&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=have &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=_type &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;sql&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"_"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;||strip(name),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"_"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;||strip(name)||&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"="&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;||strip(name)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :cntChar separated &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by&lt;/SPAN&gt; &lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;" "&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :NcntChar separated &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;" "&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :RcntChar separated &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;" "&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; from&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; _type &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;type=&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;amp;RcntChar; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;want(drop=&amp;amp;cntChar rename=(&amp;amp;RcntChar)); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;set &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;have; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;array &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;_c&amp;nbsp; &amp;amp;cntChar; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;array &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;_n&amp;nbsp; &amp;amp;NcntChar; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;do &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;over&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; _c; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; _n=input(_c,&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;8.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;contents&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=want; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 13:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87681#M25025</guid>
      <dc:creator>byronk</dc:creator>
      <dc:date>2012-04-19T13:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87682#M25026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;If you use var_nm = input(c_num,??8.); it will put a number when it is numeric and . when it is not.&amp;nbsp; Here is an example.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;DATA&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; c_num $;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;123&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;12.34&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;12.34.5&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;12a4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;12)1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;23 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;-43&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: #ffffc0; color: black; font-size: 10pt;"&gt;-.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; test1 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; test ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp; ck_num = input(c_num,??&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;8.&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;"&gt;This gives the following log and proc print; output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;NOTE: There were 8 observations read from the data set WORK.TEST.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;NOTE: The data set WORK.TEST1 has 8 observations and 2 variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;NOTE: DATA statement used (Total process time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;The SAS System&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13:59 Monday, April 16, 2012&amp;nbsp;&amp;nbsp; 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; c_num&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ck_num&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.34&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.34.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12a4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12)1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -43&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -43.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'SAS Monospace'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -0.50&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 16:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87682#M25026</guid>
      <dc:creator>eirhpaul</dc:creator>
      <dc:date>2012-04-19T16:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87683#M25027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly and without error messages.&lt;/P&gt;&lt;P&gt;From my understanding of the task,&amp;nbsp; "a) check whether var CNT_&amp;amp;STATE is a character or numeric var", was refering to the variable, not its contents specifically as often times character viarbles only contain numeric data.&amp;nbsp; Also, "b) if it is character var then to change it to numeric", by default, if you change a character field to a numeric, you will lose any non-numeric data as it is nolonger compatible in the new datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if he only wanted to change those from character to numeric where it could without data loss, then you could do another check prior to the sql statemes above to trap the character variables that you didn't want converted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 16:37:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87683#M25027</guid>
      <dc:creator>byronk</dc:creator>
      <dc:date>2012-04-19T16:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87684#M25028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This example is from documentation. I Just copy it here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 03:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87684#M25028</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-20T03:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: unknown variable name and conversion to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87685#M25029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, I skipped the answer to the first part of the question.&amp;nbsp; Fortunately there is a very simple solution.&lt;/P&gt;&lt;P&gt;Use the vtype function to test if CNT_&amp;amp;STATE is charater or numeric.&lt;/P&gt;&lt;P&gt; vtype(cnt_&amp;amp;state); Returns 'N' if it is numeric and 'C' if it is character.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 13:31:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/unknown-variable-name-and-conversion-to-numeric/m-p/87685#M25029</guid>
      <dc:creator>eirhpaul</dc:creator>
      <dc:date>2012-04-20T13:31:57Z</dc:date>
    </item>
  </channel>
</rss>

