<?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: Invalid numeric data error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336224#M62975</link>
    <description>&lt;P&gt;Look at line 81 of your log. You're doing something there that assumes that the contents of CLM_PRNCPAL_DGNS_CD are numeric.&lt;/P&gt;
&lt;P&gt;Probably an input() function or a mathematical operation.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2017 15:03:44 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-02-27T15:03:44Z</dc:date>
    <item>
      <title>Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336212#M62974</link>
      <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I don't understand why when I'm running this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;length ICD_cat 3. ICD_other $ 1&amp;nbsp; ICD_cat10 2. DIAGNOSIS_GROUP $ 50 /*PEPPER_DX_GROUP $ 50 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;provst $ 2 benest $ 2 clm_yr 4. fiscal_yr 4. ICD_cat_num 3.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ICD_cat=substr(clm_prncpal_dgns_cd,1,3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;ICD_cat_num=compress(ICD_cat,'','A');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ICD_other=substr(clm_prncpal_dgns_cd,1,1);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ICD_cat10=substr(clm_prncpal_dgns_cd,2,2);&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;clm_yr=2015;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if month(datepart(CLM_FROM_DT)) &amp;lt; 10 then fiscal_yr=2015;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else fiscal_yr=(clm_yr + 1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;/*Categorizing ICD-9 diagnosis codes (numeric) into diagnosis groups*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if clm_prncpal_dgns_cd in ('3310') then do; DIAGNOSIS_GROUP = 'Alzheimers'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and ICD_other = 'V' then do; DIAGNOSIS_GROUP = 'Factors Influence Health'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and ICD_other = 'E' then do; DIAGNOSIS_GROUP = 'External Causes'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 001&amp;lt;=ICD_cat_num&amp;lt;=139 then do; DIAGNOSIS_GROUP = 'Infection'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 140&amp;lt;=ICD_cat_num&amp;lt;=239 then do; DIAGNOSIS_GROUP = 'Cancer'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 240&amp;lt;=ICD_cat_num&amp;lt;=279 then do; DIAGNOSIS_GROUP = 'Endocrine'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 280&amp;lt;=ICD_cat_num&amp;lt;=289 then do; DIAGNOSIS_GROUP = 'Blood'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 290&amp;lt;=ICD_cat_num&amp;lt;=319 then do; DIAGNOSIS_GROUP = 'Mental'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 320&amp;lt;=ICD_cat_num&amp;lt;=389 then do; DIAGNOSIS_GROUP = 'Nervous System'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 390&amp;lt;=ICD_cat_num&amp;lt;=459 then do; DIAGNOSIS_GROUP = 'Circulatory'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 460&amp;lt;=ICD_cat_num&amp;lt;=519 then do; DIAGNOSIS_GROUP = 'Respiratory'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 520&amp;lt;=ICD_cat_num&amp;lt;=579 then do; DIAGNOSIS_GROUP = 'Digestive'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 580&amp;lt;=ICD_cat_num&amp;lt;=629 then do; DIAGNOSIS_GROUP = 'Genitourinary'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 630&amp;lt;=ICD_cat_num&amp;lt;=679 then do; DIAGNOSIS_GROUP = 'Childbirth/Pregnancy'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 680&amp;lt;=ICD_cat_num&amp;lt;=709 then do; DIAGNOSIS_GROUP = 'Skin'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 710&amp;lt;=ICD_cat_num&amp;lt;=739 then do; DIAGNOSIS_GROUP = 'Musculoskeletal'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 740&amp;lt;=ICD_cat_num&amp;lt;=759 then do; DIAGNOSIS_GROUP = 'Congenital Anomalies'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 760&amp;lt;=ICD_cat_num&amp;lt;=779 then do; DIAGNOSIS_GROUP = 'Prenatal'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 780&amp;lt;=ICD_cat_num&amp;lt;=799 then do; DIAGNOSIS_GROUP = 'Ill-Defined'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2015 and 800&amp;lt;=ICD_cat_num&amp;lt;=999 then do; DIAGNOSIS_GROUP = 'Injury/Poisoning'; end;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;/*Categorizing ICD-10 diagnosis codes (alphanumeric) into diagnosis groups. ICD-10 became effective October 1, 2015 (FY2016).&amp;nbsp; See &lt;A href="http://www.icd10data.com/ICD10CM/Codes*/" target="_blank"&gt;http://www.icd10data.com/ICD10CM/Codes*/&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='A' or ICD_other='B') then do; DIAGNOSIS_GROUP =&amp;nbsp; 'Infection'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='C' or (ICD_other = 'D' and 00&amp;lt;=ICD_cat10&amp;lt;=49) or (ICD_other='D' and (substr(CLM_PRNCPAL_DGNS_CD,2,2))='3A')) then do; DIAGNOSIS_GROUP='Cancer'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='D' and 50&amp;lt;=ICD_cat10&amp;lt;=89) then do; DIAGNOSIS_GROUP = 'Blood'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='E' and (00&amp;lt;=ICD_cat10&amp;lt;=89)) then do; DIAGNOSIS_GROUP = 'Endocrine'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='F' then do; DIAGNOSIS_GROUP = 'Mental'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;else if fiscal_yr=2016 and ICD_other='G' then do; DIAGNOSIS_GROUP = 'Nervous System'; end;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='H' and 00&amp;lt;=ICD_cat10&amp;lt;=59) then do; DIAGNOSIS_GROUP = 'Eye and Adnexa'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='H' and 60&amp;lt;=ICD_cat10&amp;lt;=95) then do; DIAGNOSIS_GROUP = 'Ear and Mastoid Process'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='I' then do; DIAGNOSIS_GROUP = 'Circulatory'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='J' then do; DIAGNOSIS_GROUP = 'Respiratory'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='K' then do; DIAGNOSIS_GROUP = 'Digestive'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='L' then do; DIAGNOSIS_GROUP = 'Skin'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='M' then do; DIAGNOSIS_GROUP = 'Musculoskeletal'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='N' then do; DIAGNOSIS_GROUP = 'Genitourinary'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='O' then do; DIAGNOSIS_GROUP = 'Childbirth/Pregnancy'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='P' then do; DIAGNOSIS_GROUP = 'Prenatal'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='Q' then do; DIAGNOSIS_GROUP = 'Congenital Anomalies'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='R' then DIAGNOSIS_GROUP = 'Ill-Defined';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other in ('S','T') then do; DIAGNOSIS_GROUP = 'Injury/Poisoning'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and (ICD_other='V' or ICD_other='Y') then do; DIAGNOSIS_GROUP = 'External Causes'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if fiscal_yr=2016 and ICD_other='Z' then do; DIAGNOSIS_GROUP='Factors Influence Health'; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if ICD_cat = ' ' then do; DIAGNOSIS_GROUP = 'Missing'; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this note/error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT color="#0000FF"&gt;NOTE: Invalid numeric data, 'G20' , at line 81 column 17.&lt;/FONT&gt;&lt;BR /&gt;CLM_FROM_DT=13OCT2015:00:00:00&amp;nbsp; CLM_PRNCPAL_DGNS_CD=G20&amp;nbsp;CLM_PRNCPAL_DGNS_VRSN=0&lt;BR /&gt;ICD_cat=.&amp;nbsp; ICD_other=G&amp;nbsp; ICD_cat10=20&amp;nbsp; DIAGNOSIS_GROUP=Nervous System&lt;BR /&gt;clm_yr=2015 fiscal_yr=2016 ICD_cat_num=. _ERROR_=1 _N_=24&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Any suggestions on how I can address this problem?&amp;nbsp; I tried "if/then" statements prior to these "if/then do" statements, but both approaches yield the same SAS note/error.&amp;nbsp; (I'm using SAS 9.4)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Feb 2017 14:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336212#M62974</guid>
      <dc:creator>ABC73</dc:creator>
      <dc:date>2017-02-27T14:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336224#M62975</link>
      <description>&lt;P&gt;Look at line 81 of your log. You're doing something there that assumes that the contents of CLM_PRNCPAL_DGNS_CD are numeric.&lt;/P&gt;
&lt;P&gt;Probably an input() function or a mathematical operation.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 15:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336224#M62975</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-27T15:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336225#M62976</link>
      <description>&lt;P&gt;Not read the whole things, but from your error (comments between ^):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;length ICD_cat 3. ICD_other $ 1&amp;nbsp; ICD_cat10 2. DIAGNOSIS_GROUP $ 50 /*PEPPER_DX_GROUP $ 50 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;provst $ 2 benest $ 2 clm_yr 4. fiscal_yr 4. ICD_cat_num 3.;&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; &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;^ defined as num ^&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ICD_cat_num=compress(ICD_cat,'','A');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^ the above returns a string, icd_cat and the letter 'A', as that is not a number you get the error ^&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 15:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336225#M62976</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-27T15:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336231#M62978</link>
      <description>&lt;P&gt;It would be easier if you would tell us which line of the program corresponds to line 81 that the log is referencing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At any rate, your LENGTH statement makes ID_CAT numeric.&amp;nbsp; That is probably wrong.&amp;nbsp; Change the LENGTH statement to make ID_CAT character and that should handle the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 15:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336231#M62978</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-02-27T15:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336234#M62979</link>
      <description>&lt;P&gt;This&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ICD_cat=substr(clm_prncpal_dgns_cd,1,3);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the culprit.&lt;/P&gt;
&lt;P&gt;By assigning a length of 3. (instead of $3.) to ICD_cat, you defined it numeric. As clm_prncpal_dgns_cd contains 'G20', SAS then fails when it tries to convert the result of the substr to numeric.&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Make the length of ICD_cat in the length statement $3, and you should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 15:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336234#M62979</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-27T15:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336241#M62980</link>
      <description>Thank you! I think I'm getting closer to a fix. As advised, I defined ICD_cat as a character variable. I am now getting some error messages for another variable, ICD_cat10. See the error below.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;NOTE: Invalid numeric data, ICD_cat10='3A' , at line 912 column 79.&lt;BR /&gt;CLM_PRNCPAL_DGNS_CD=D3A090I CD_cat=D3A ICD_other=D ICD_cat10=3A DIAGNOSIS_GROUP=Cancer provst=OH benest=OH&lt;BR /&gt;&lt;BR /&gt;clm_yr=2015 fiscal_yr=2016 ICD_cat_num=3 _ERROR_=1 _N_=191179&lt;BR /&gt;&lt;BR /&gt;Here's the corresponding log line:&lt;BR /&gt;&lt;BR /&gt;912 else if fiscal_yr=2016 and (ICD_other='C' or (ICD_other = 'D' and 00&amp;lt;=ICD_cat10&amp;lt;=49) or (ICD_other='D' and&lt;BR /&gt;&lt;BR /&gt;912! (substr(CLM_PRNCPAL_DGNS_CD,2,2))='3A')) then do; DIAGNOSIS_GROUP='Cancer'; end;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Feb 2017 15:49:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336241#M62980</guid>
      <dc:creator>ABC73</dc:creator>
      <dc:date>2017-02-27T15:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid numeric data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336273#M62989</link>
      <description>&lt;P&gt;Issue solved.&amp;nbsp; Thank you all for your assistance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 17:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-numeric-data-error/m-p/336273#M62989</guid>
      <dc:creator>ABC73</dc:creator>
      <dc:date>2017-02-27T17:37:13Z</dc:date>
    </item>
  </channel>
</rss>

