<?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: How to remove dot and assign format / informat after using PUT() in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908388#M358474</link>
    <description>&lt;P&gt;1) character variables need neither a format nor an informat, unless some special recoding is wanted.&lt;/P&gt;
&lt;P&gt;2) try options missing = " "; before you do the conversion&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 20:21:09 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-12-15T20:21:09Z</dc:date>
    <item>
      <title>How to remove dot and assign format / informat after using PUT()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908383#M358472</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a table using Proc Sql and used PUT() to convert numeric value to character. There are two issues that I'm now facing and hoping someone can help me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How can I assign format and informat to those columns with no format and informat?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="couthelle_0-1702670924420.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91564iE96C66A527090047/image-size/medium?v=v2&amp;amp;px=400" role="button" title="couthelle_0-1702670924420.png" alt="couthelle_0-1702670924420.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. For the column wherein I used put(x,9.), I got 8 spaces + . (dot) for those with no value. How do I replace this to just be simply blank?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="couthelle_1-1702671037553.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91565i1A9C660C5CD546A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="couthelle_1-1702671037553.png" alt="couthelle_1-1702671037553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to incorporate the solution into my proc sql table? If not what's the most efficient way to tackle these issues?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 20:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908383#M358472</guid>
      <dc:creator>couthelle</dc:creator>
      <dc:date>2023-12-15T20:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dot and assign format / informat after using PUT()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908388#M358474</link>
      <description>&lt;P&gt;1) character variables need neither a format nor an informat, unless some special recoding is wanted.&lt;/P&gt;
&lt;P&gt;2) try options missing = " "; before you do the conversion&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 20:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908388#M358474</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-12-15T20:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove dot and assign format / informat after using PUT()</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908399#M358479</link>
      <description>&lt;P&gt;Also note that using PUT(x,9.) will cause the actual values to be RIGHT ALIGNED.&amp;nbsp; So numbers that only need less than 9 digits to be displayed will have leading spaces.&amp;nbsp; &amp;nbsp;Is that what you want?&amp;nbsp; I noticed from the picture of your PROC CONTENTS output that you are using ODS to display things.&amp;nbsp; That will NOT display the leading spaces, which can lead to confusion then trying to compare values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use Z9. to use leading zeros instead.&lt;/P&gt;
&lt;P&gt;You could use 9.-L to generate trailing spaces instead.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 20:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-dot-and-assign-format-informat-after-using-PUT/m-p/908399#M358479</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-12-15T20:57:42Z</dc:date>
    </item>
  </channel>
</rss>

