<?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: Troublesome quotation marks (TRANWRD function) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693510#M211475</link>
    <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33000" target="_blank"&gt;EinarRoed&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To remove "" use &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n101a8jch5trh0n1bc5neq48hc89.htm&amp;amp;locale=en" target="_self"&gt;transtrn() function with &lt;STRONG&gt;trimn('')&lt;/STRONG&gt;&lt;/A&gt; as the 3-rd argument:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input_string = transtrn(input_string, '""', trimn(''));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To further remove carriage return symbol along with all control symbols use &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=fedsqlref&amp;amp;docsetTarget=n01p24mgwawxa2n1hy4gwe5t59xf.htm&amp;amp;locale=en" target="_self"&gt;compress() function&lt;/A&gt; with 'c' modifier as the 3-rd argument:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input_string = compress(input_string,,'c');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2020 14:04:06 GMT</pubDate>
    <dc:creator>LeonidBatkhan</dc:creator>
    <dc:date>2020-10-22T14:04:06Z</dc:date>
    <item>
      <title>Troublesome quotation marks (TRANWRD function)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693438#M211436</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;We need to remove certain pesky characters from a freetext field we're reading from a source system.&lt;/P&gt;
&lt;P&gt;Some of the things we must remove are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Double double quotation marks (""). To be clear: The single character " two times in a row.&lt;/LI&gt;
&lt;LI&gt;The carriage return symbol identified as '0D'x in SAS&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This doesn't seem to work due to the use of ' in 0D'x:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	do chars_to_remove = '""', '0D'x';
		input_string = tranwrd(input_string, chars_to_remove, '');
	end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you please suggest a good way to handle this?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 09:07:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693438#M211436</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2020-10-22T09:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Troublesome quotation marks (TRANWRD function)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693446#M211441</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;tranwrd(input_string, trim(chars_to_remove), ' ');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The tranwrd function will insert a single blank even if you don't want it, switching to transtrn or using compbl will solve that issue.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 09:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693446#M211441</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-10-22T09:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Troublesome quotation marks (TRANWRD function)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693510#M211475</link>
      <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33000" target="_blank"&gt;EinarRoed&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To remove "" use &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n101a8jch5trh0n1bc5neq48hc89.htm&amp;amp;locale=en" target="_self"&gt;transtrn() function with &lt;STRONG&gt;trimn('')&lt;/STRONG&gt;&lt;/A&gt; as the 3-rd argument:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input_string = transtrn(input_string, '""', trimn(''));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To further remove carriage return symbol along with all control symbols use &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=fedsqlref&amp;amp;docsetTarget=n01p24mgwawxa2n1hy4gwe5t59xf.htm&amp;amp;locale=en" target="_self"&gt;compress() function&lt;/A&gt; with 'c' modifier as the 3-rd argument:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input_string = compress(input_string,,'c');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 14:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Troublesome-quotation-marks-TRANWRD-function/m-p/693510#M211475</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2020-10-22T14:04:06Z</dc:date>
    </item>
  </channel>
</rss>

