<?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: Character values have been converted to numeric values at the places given by: (Line):(Column). in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295896#M61889</link>
    <description>&lt;P&gt;When you created the array New the variables by default were created as numeric if they did not exist in the data set ABC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ARRAY&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; NEW (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;;"&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;) $1&amp;nbsp;INDICATOR1_NEW INDICATOR2_NEW INDICATOR3_NEW;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;would create character variables of length 1. if you need longer than increase the 1 to the needed length.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 15:47:28 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-09-01T15:47:28Z</dc:date>
    <item>
      <title>Character values have been converted to numeric values at the places given by: (Line):(Column).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295887#M61886</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;Hi,&amp;nbsp;I try to create three new indicator columns. These indicators are character filed. When I run my code, I got the below message. It seems SAS converted these fields to numeric value. What should I do?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;Thanks &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: green; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: green; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21:22&amp;nbsp;&amp;nbsp; 22:28&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: green; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;NOTE: Invalid numeric data, 'Y' , at line 22 column 36.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: green; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;NOTE: Invalid numeric data, 'Y' , at line 22 column 36.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;;"&gt;DATA&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; TEST;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; ABC;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ARRAY&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; OLD (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;;"&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;) INDICATOR1 INDICATOR2 INDICATOR3;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ARRAY&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; NEW (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;;"&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;) INDICATOR1_NEW INDICATOR2_NEW INDICATOR3_NEW;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;DO&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; I = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;TO&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;;"&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; OLD(I) = &lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: &amp;quot;Courier New&amp;quot;;"&gt;"N"&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; NEW(I)= &lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: &amp;quot;Courier New&amp;quot;;"&gt;" "&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ELSE&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; OLD(I) NE &lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: &amp;quot;Courier New&amp;quot;;"&gt;"N"&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; NEW(I) =OLD(I);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;END&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;DROP&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; I;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;;"&gt;RUN&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 15:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295887#M61886</guid>
      <dc:creator>LL5</dc:creator>
      <dc:date>2016-09-01T15:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Character values have been converted to numeric values at the places given by: (Line):(Column).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295896#M61889</link>
      <description>&lt;P&gt;When you created the array New the variables by default were created as numeric if they did not exist in the data set ABC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ARRAY&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt; NEW (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;;"&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;) $1&amp;nbsp;INDICATOR1_NEW INDICATOR2_NEW INDICATOR3_NEW;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;;"&gt;would create character variables of length 1. if you need longer than increase the 1 to the needed length.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 15:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295896#M61889</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-01T15:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Character values have been converted to numeric values at the places given by: (Line):(Column).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295924#M61904</link>
      <description>&lt;P&gt;Thanks Ballardw. It works now!&lt;/P&gt;&lt;P&gt;What happen if INDICATOR1_NEW has one&amp;nbsp;character, where&amp;nbsp;INDICATOR2_NEW and&amp;nbsp;INDICATOR3_NEW have two characters?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 16:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295924#M61904</guid>
      <dc:creator>LL5</dc:creator>
      <dc:date>2016-09-01T16:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Character values have been converted to numeric values at the places given by: (Line):(Column).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295949#M61913</link>
      <description>&lt;P&gt;It would probably be easiest just to assign them all the same max length of $2. If the actual length becomes an issue you can specify a Length statment for the new variables before putting them in the Array definition such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Length &lt;FONT face="Courier New"&gt;INDICATOR1_NEW $ 1&amp;nbsp;INDICATOR2_NEW INDICATOR3_NEW $ 2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;BTW I would recommend using New_Indicator1, New_Indicator2 etc. For a number of reasons. It is easy to specify variable lists such as New_I: to get all variables that start with New_I for almost anything that accepts a list of variable names. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;For instance your array definition could be &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Array new (3) $2 New_Indicator1 - New_Indicator3;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Which when you get to a project with 25, 50 or more variables makes things a whole lot easier to change that 3 to 25 and be done instead of typing in all 25 variable names.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 17:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/295949#M61913</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-01T17:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Character values have been converted to numeric values at the places given by: (Line):(Column).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/296008#M61939</link>
      <description>Great. Thanks. This is very helpful.</description>
      <pubDate>Thu, 01 Sep 2016 21:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Character-values-have-been-converted-to-numeric-values-at-the/m-p/296008#M61939</guid>
      <dc:creator>LL5</dc:creator>
      <dc:date>2016-09-01T21:25:15Z</dc:date>
    </item>
  </channel>
</rss>

