<?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 Remove the last 2 zeros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-the-last-2-zeros/m-p/791648#M253613</link>
    <description>I have a numeric integer variable. If last 2 digits are zeros, then I want to remove those zeros. How can I do that? &lt;BR /&gt;For example, 100 should be 1, 101 should be 101, 3300 should be 33. &lt;BR /&gt;Thank you!</description>
    <pubDate>Sat, 22 Jan 2022 16:36:03 GMT</pubDate>
    <dc:creator>Emma2021</dc:creator>
    <dc:date>2022-01-22T16:36:03Z</dc:date>
    <item>
      <title>Remove the last 2 zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-the-last-2-zeros/m-p/791648#M253613</link>
      <description>I have a numeric integer variable. If last 2 digits are zeros, then I want to remove those zeros. How can I do that? &lt;BR /&gt;For example, 100 should be 1, 101 should be 101, 3300 should be 33. &lt;BR /&gt;Thank you!</description>
      <pubDate>Sat, 22 Jan 2022 16:36:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-the-last-2-zeros/m-p/791648#M253613</guid>
      <dc:creator>Emma2021</dc:creator>
      <dc:date>2022-01-22T16:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the last 2 zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-the-last-2-zeros/m-p/791650#M253614</link>
      <description>&lt;P&gt;How about this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  do num=100, 101, 3300;
    output;
  end;
run;

data want;
  set have;
  temp=mod(num,100);
  new=ifn(temp=0,num/100,num);
  drop temp;
run;

/* If you want to store the result in the same variable again, the following data step is simpler. */
data want;
  set have;
  if mod(num,100)=0 then num=num/100;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Jan 2022 17:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-the-last-2-zeros/m-p/791650#M253614</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-01-22T17:08:14Z</dc:date>
    </item>
  </channel>
</rss>

