<?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: Replacing values with text but got just 2 characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936148#M368000</link>
    <description>Thank you so much its works very well. Just another question : if the string value IS différent for B C ... Q . I Have différent text value for each columns. For A= "l'utilisateur marche bien". I have another text for B etc -- Q</description>
    <pubDate>Thu, 18 Jul 2024 10:39:42 GMT</pubDate>
    <dc:creator>Idi</dc:creator>
    <dc:date>2024-07-18T10:39:42Z</dc:date>
    <item>
      <title>Replacing values with text but got just 2 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936133#M367995</link>
      <description>Hello ,&lt;BR /&gt;&lt;BR /&gt;I have data with multiples columns : A -- Q&lt;BR /&gt;Inside the column i have 3 valies : N/A , Yes , No&lt;BR /&gt;I want to replace Yes with a text like :&lt;BR /&gt;If A = Yes then A = "L'utilisateur marche bien "&lt;BR /&gt;But i got only : L'u&lt;BR /&gt;&lt;BR /&gt;And i want to replace all the N/A and No with blank : " " just blank.&lt;BR /&gt;&lt;BR /&gt;Can you help please ?&lt;BR /&gt;&lt;BR /&gt;Thanks so much&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jul 2024 09:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936133#M367995</guid>
      <dc:creator>Idi</dc:creator>
      <dc:date>2024-07-18T09:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing values with text but got just 2 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936142#M367997</link>
      <description>&lt;P&gt;Easier would be to use custom format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
     value $fmt 'Yes'="L'utilisateur marche bien" 'No','N/A'=' ';
run;
data want;   
    set have;
    format a--q $fmt.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason your code won't work without modification is that A--Q has a length of 3 characters, this doesn't change when assigning the value&amp;nbsp;L'utilisateur marche bien, you only get the first 3 characters. You would need use a LENGTH statement to change this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length a--q $ 25;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;because the text you want is 25 characters. But really, use the easier approach which is PROC FORMAT above.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 09:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936142#M367997</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-18T09:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing values with text but got just 2 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936146#M367998</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/448432"&gt;@Idi&lt;/a&gt; Please don't write followup questions in the field for tags. Please write your followup question by clicking on "Reply".&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 10:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936146#M367998</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-18T10:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing values with text but got just 2 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936147#M367999</link>
      <description>Thank you so much</description>
      <pubDate>Thu, 18 Jul 2024 10:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936147#M367999</guid>
      <dc:creator>Idi</dc:creator>
      <dc:date>2024-07-18T10:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing values with text but got just 2 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936148#M368000</link>
      <description>Thank you so much its works very well. Just another question : if the string value IS différent for B C ... Q . I Have différent text value for each columns. For A= "l'utilisateur marche bien". I have another text for B etc -- Q</description>
      <pubDate>Thu, 18 Jul 2024 10:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936148#M368000</guid>
      <dc:creator>Idi</dc:creator>
      <dc:date>2024-07-18T10:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing values with text but got just 2 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936149#M368001</link>
      <description>&lt;P&gt;Then you will need different formats for each variable.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 11:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replacing-values-with-text-but-got-just-2-characters/m-p/936149#M368001</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-18T11:49:37Z</dc:date>
    </item>
  </channel>
</rss>

