<?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: NUMERICAL TO CHARACTER FORMAT HELP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700033#M214194</link>
    <description>&lt;P&gt;When you use PUT to create a character variable from numeric the results by default are right justified so you end up with leading spaces for values less than 8, in your example, digits.&lt;/P&gt;
&lt;P&gt;Use the -L justification option:&amp;nbsp; put(var, 8 -L) to create a left justified variable.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 23:05:01 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-11-18T23:05:01Z</dc:date>
    <item>
      <title>NUMERICAL TO CHARACTER FORMAT HELP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700024#M214189</link>
      <description>Hey, everyone... I'm trying to convert a numerical variable to a character variable to be able to join an additional table (each one has the same variable nomenclature, but one is numerical and one is character... (not my) poor design, I know. The variable customer_id is numerical in the xxx_customers table with a length of 8 bytes and format/informat of 20. Same variable (customer_id) is character in the xxx_investigation_relationship table with a length of 50 bytes and format/informat of $50. I'm wanting to change the numerical variable in the xxx_customers table to character for joining the xxx_investigation_relationship table. The customer_id can vary from as few as four (4) digits to as many as eight (8) digits. Not sure if that matters when converting to character. I tried using put(xxx_customers.customer_id, 8.) as customer_id. While it did change the format to character, the join won't produce results (which it should as I've manually checked some customer_id to find them in each table). Thanks in advance for any and all assistance rendered.</description>
      <pubDate>Wed, 18 Nov 2020 22:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700024#M214189</guid>
      <dc:creator>hnb_matt_d</dc:creator>
      <dc:date>2020-11-18T22:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: NUMERICAL TO CHARACTER FORMAT HELP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700033#M214194</link>
      <description>&lt;P&gt;When you use PUT to create a character variable from numeric the results by default are right justified so you end up with leading spaces for values less than 8, in your example, digits.&lt;/P&gt;
&lt;P&gt;Use the -L justification option:&amp;nbsp; put(var, 8 -L) to create a left justified variable.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700033#M214194</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-18T23:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: NUMERICAL TO CHARACTER FORMAT HELP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700035#M214196</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;While it did change the format to character, the join won't produce results&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There could be a lot of reasons for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us examples of typical values in each of the two variables. Let's say we need to see a dozen example. Show us the code you used.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NUMERICAL-TO-CHARACTER-FORMAT-HELP/m-p/700035#M214196</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-18T23:06:24Z</dc:date>
    </item>
  </channel>
</rss>

