<?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: Convert characters to numeric and back to characte in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973015#M377630</link>
    <description>&lt;P&gt;Informats convert text to values.&amp;nbsp; Formats convert values to text.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  string = put(1000*input(string,32.),best32.-L);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Change HAVE , STRING and WANT to match the names of the datasets and variable you have.&lt;/P&gt;
&lt;P&gt;If STRING is shorter than 32 bytes long then adjust the format specification used with the PUT() function accordingly.&amp;nbsp; You don't need to adjust the informat since the INPUT() function dose not care if the width used in the informat specification is larger than the length of the string being read.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Aug 2025 03:16:05 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-08-21T03:16:05Z</dc:date>
    <item>
      <title>Convert characters to numeric and back to characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973011#M377629</link>
      <description>&lt;P&gt;I have numerical lab results that come in as character values (eg 0.1, 1.5 etc). I wanted to multiply this values by 1000 and keep them as character values.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 23:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973011#M377629</guid>
      <dc:creator>malangba</dc:creator>
      <dc:date>2025-08-20T23:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert characters to numeric and back to characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973015#M377630</link>
      <description>&lt;P&gt;Informats convert text to values.&amp;nbsp; Formats convert values to text.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  string = put(1000*input(string,32.),best32.-L);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Change HAVE , STRING and WANT to match the names of the datasets and variable you have.&lt;/P&gt;
&lt;P&gt;If STRING is shorter than 32 bytes long then adjust the format specification used with the PUT() function accordingly.&amp;nbsp; You don't need to adjust the informat since the INPUT() function dose not care if the width used in the informat specification is larger than the length of the string being read.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 03:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973015#M377630</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-08-21T03:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert characters to numeric and back to characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973026#M377632</link>
      <description>&lt;P&gt;Why do you want to store numbers in character variables, which makes it harder to use them?&lt;/P&gt;
&lt;P&gt;Use numeric variables with a suitable format for display.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2025 08:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-characters-to-numeric-and-back-to-characte/m-p/973026#M377632</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-08-21T08:44:39Z</dc:date>
    </item>
  </channel>
</rss>

