<?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 NOTE: Invalid numeric data, 'Fremragende' , at line 33 column 31. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873851#M38757</link>
    <description>&lt;P&gt;Hi. I'm trying to redefine some variables as number because I need a score in the end. (SF36 in Danish)&lt;/P&gt;&lt;P&gt;However my code does not work and i can not figure out what I am doing wrong:&lt;/P&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA sf36i;&lt;BR /&gt;format general_health 8.;&lt;BR /&gt;length general_health 8;&lt;BR /&gt;set SF36;&lt;/P&gt;&lt;P&gt;if hvordan_synes_du_dit_helbr="Fremragende" then general_health=1;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Vældigt godt" then general_health=2;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Godt" then general_health=3;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Mindre godt" then general_health=4;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Dårligt" then general_health=5;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It creats number only where there is missing data and only 5. Can you help me troubleshooting?&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 12:53:00 GMT</pubDate>
    <dc:creator>Jannie_D</dc:creator>
    <dc:date>2023-05-04T12:53:00Z</dc:date>
    <item>
      <title>NOTE: Invalid numeric data, 'Fremragende' , at line 33 column 31.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873851#M38757</link>
      <description>&lt;P&gt;Hi. I'm trying to redefine some variables as number because I need a score in the end. (SF36 in Danish)&lt;/P&gt;&lt;P&gt;However my code does not work and i can not figure out what I am doing wrong:&lt;/P&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA sf36i;&lt;BR /&gt;format general_health 8.;&lt;BR /&gt;length general_health 8;&lt;BR /&gt;set SF36;&lt;/P&gt;&lt;P&gt;if hvordan_synes_du_dit_helbr="Fremragende" then general_health=1;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Vældigt godt" then general_health=2;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Godt" then general_health=3;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Mindre godt" then general_health=4;&lt;BR /&gt;if hvordan_synes_du_dit_helbr="Dårligt" then general_health=5;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It creats number only where there is missing data and only 5. Can you help me troubleshooting?&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 12:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873851#M38757</guid>
      <dc:creator>Jannie_D</dc:creator>
      <dc:date>2023-05-04T12:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid numeric data, 'Fremragende' , at line 33 column 31.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873862#M38759</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When there are errors in the log, you need to show us the ENTIRE log (not just the errors) for this data step.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It would seem from the error message you have provided that the variable HVORDAN_SYNES_DU_DIT_HELBR is numeric and therefore you cannot test to see if it is equal to a character string such as&amp;nbsp;"Fremragende". Thus it would also help if you showed us a portion of the data in data set SF36, as working SAS data step code, which you can see examples and instructions &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Typically, we do not want the errors in the log to be used as the subject line. We would want a verbal description of the problem, such as "Trying to assign categories".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 14:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873862#M38759</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-04T14:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid numeric data, 'Fremragende' , at line 33 column 31.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873864#M38760</link>
      <description>&lt;P&gt;What is the data type of&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"hvordan_synes_du_dit_helbr"&amp;nbsp; I suspect it it NUMERIC and the reason you are getting the message.&amp;nbsp; SAS is trying to convert the character constant&amp;nbsp;"Fremragende" to numeric for the comparison&amp;nbsp;to numeric&amp;nbsp;&amp;nbsp;variable&amp;nbsp;hvordan_synes_du_dit_helbr.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 14:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873864#M38760</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2023-05-04T14:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Invalid numeric data, 'Fremragende' , at line 33 column 31.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873890#M38762</link>
      <description>&lt;P&gt;There is chance that your variable hvordan_synes_du_dit_helbr is numeric and has a custom format assigned that displays text like "Fremragende" as the formatted value.&lt;/P&gt;
&lt;P&gt;Check to see what the Format for the variable is with Proc Contents or examining variable properties in your preferred manner.&lt;/P&gt;
&lt;P&gt;The good news may be that you don't need a new variable at all depending on the underlying numeric range for hvordan_synes_du_dit_helbr .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may find the result from this helpful.&lt;/P&gt;
&lt;PRE&gt;proc freq data=SF36;
   tables hvordan_synes_du_dit_helbr ;
   format hvordan_synes_du_dit_helbr  best5. ;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 May 2023 15:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NOTE-Invalid-numeric-data-Fremragende-at-line-33-column-31/m-p/873890#M38762</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-04T15:07:04Z</dc:date>
    </item>
  </channel>
</rss>

