<?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 SAS Function to check whether the field value is decimal or numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201682#M266853</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;Is there a SAS fucntion to check whether the field value is numeric or decimal. Please anyone can advise?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2015 14:08:33 GMT</pubDate>
    <dc:creator>sivaram_veerabagu</dc:creator>
    <dc:date>2015-08-18T14:08:33Z</dc:date>
    <item>
      <title>SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201682#M266853</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;Is there a SAS fucntion to check whether the field value is numeric or decimal. Please anyone can advise?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 14:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201682#M266853</guid>
      <dc:creator>sivaram_veerabagu</dc:creator>
      <dc:date>2015-08-18T14:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201683#M266854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain more and give an example? Do you mean integer values versus having a decimal part?&lt;/P&gt;&lt;P&gt;If so, you can test whether int(x)=x.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 14:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201683#M266854</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-18T14:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201684#M266855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g If I have the values for the column in the dataset as follows.&lt;/P&gt;&lt;P&gt;TOTAL_SUM&lt;/P&gt;&lt;P&gt;156&lt;/P&gt;&lt;P&gt;134.67&lt;/P&gt;&lt;P&gt;147&lt;/P&gt;&lt;P&gt;190.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find if the value of TOTAL_SUM is decimal then I have to do some manipulation based on that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:20:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201684#M266855</guid>
      <dc:creator>sivaram_veerabagu</dc:creator>
      <dc:date>2015-08-18T15:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201685#M266856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your definition of decimal? What manipulation do you need to do? What do you want your output to look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201685#M266856</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-18T15:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201686#M266857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g If have a decimal point(.) in the value then I would like to multiply only those value with 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201686#M266857</guid>
      <dc:creator>sivaram_veerabagu</dc:creator>
      <dc:date>2015-08-18T15:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201687#M266858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if int(TOTAL_SUM) ^= TOTAL_SUM then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; TOTAL_SUM = TOTAL_SUM*100;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201687#M266858</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-18T15:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201688#M266859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g the following decimal values have to be multiplied by 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;134.67 -&amp;gt; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;134.67 *100 -&amp;gt; 13467&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Siva&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201688#M266859</guid>
      <dc:creator>sivaram_veerabagu</dc:creator>
      <dc:date>2015-08-18T15:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201689#M266860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Irrespective of the number of decimal places,if you want to multiply the number with 100 then you can use the following code.&lt;/P&gt;&lt;P&gt;data Want;&lt;/P&gt;&lt;P&gt;input Total_Sum;&lt;/P&gt;&lt;P&gt;if scan(Total_Sum,2,'.') ne " " then Total_Sum=Total_Sum*100;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;156&lt;/P&gt;&lt;P&gt;134.67&lt;/P&gt;&lt;P&gt;147&lt;/P&gt;&lt;P&gt;190.00&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is condition on which the number should be multiplied basing on the number of decimal places(i.e multiply with 100 if the value has two decimal places and 10 for 1 decimal place ....) then you can use the following code&lt;/P&gt;&lt;P&gt;data Want;&lt;/P&gt;&lt;P&gt;input Total_Sum;&lt;/P&gt;&lt;P&gt;if lengthn(scan(Total_Sum,2,'.')) ge 2 then Total_Sum=Total_Sum*100;&lt;/P&gt;&lt;P&gt;if lengthn(scan(Total_Sum,2,'.')) eq 1 then Total_Sum=Total_Sum*10;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;156&lt;/P&gt;&lt;P&gt;156.1&lt;/P&gt;&lt;P&gt;134.67&lt;/P&gt;&lt;P&gt;147&lt;/P&gt;&lt;P&gt;190.00&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201689#M266860</guid>
      <dc:creator>MadhuKorni</dc:creator>
      <dc:date>2015-08-18T15:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Function to check whether the field value is decimal or numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201690#M266861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/m-p/201690#M266861</guid>
      <dc:creator>sivaram_veerabagu</dc:creator>
      <dc:date>2015-08-18T15:58:35Z</dc:date>
    </item>
  </channel>
</rss>

