<?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: Removing quotation marks in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230389#M41771</link>
    <description>&lt;P&gt;Alternatively try the perl regular expression function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input string$20.;
string2=prxchange('s/\"//',-1,string);
cards;
"0.1%" 
"0.00123321%"
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;</description>
    <pubDate>Sat, 17 Oct 2015 00:44:29 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2015-10-17T00:44:29Z</dc:date>
    <item>
      <title>Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230358#M41759</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple question for you experts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset where all the data are between double quotation marks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exemple:&lt;/P&gt;&lt;P&gt;"0.1%"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"0.00123321%"&lt;/P&gt;&lt;P&gt;and "" when there is no value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I remove the quotations marks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. I need to remove them in order to be able to do show descriptive statistics with the proc means function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 19:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230358#M41759</guid>
      <dc:creator>AntoineA</dc:creator>
      <dc:date>2015-10-16T19:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230360#M41760</link>
      <description>&lt;P&gt;Use the COMPRESS function&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 20:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230360#M41760</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-16T20:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230361#M41761</link>
      <description>&lt;P&gt;You can use the compress() function to do that.&amp;nbsp; The syntax below should help clean up the fields, hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar=compress(oldvar,'"');&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 20:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230361#M41761</guid>
      <dc:creator>dcruik</dc:creator>
      <dc:date>2015-10-16T20:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230379#M41770</link>
      <description>&lt;P&gt;Thank you both,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the compress command would not work for me the output data kept the "".&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;spread6m99=compress(spread6m,'"');&lt;/SPAN&gt;&lt;BR /&gt;Instead I tried this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;spread6m99 = substr(spread6m,2,(length(spread6m)-3));&lt;BR /&gt;IF spread6m99='"' THEN spread6m99='';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems to work.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 21:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230379#M41770</guid>
      <dc:creator>AntoineA</dc:creator>
      <dc:date>2015-10-16T21:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230389#M41771</link>
      <description>&lt;P&gt;Alternatively try the perl regular expression function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input string$20.;
string2=prxchange('s/\"//',-1,string);
cards;
"0.1%" 
"0.00123321%"
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2015 00:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230389#M41771</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-10-17T00:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230404#M41775</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58418"&gt;@AntoineA&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you both,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the compress command would not work for me the output data kept the "".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;newvariable=compress(oldvariable,'"');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's a little hard to read, but after oldvariable, you type a comma, a single quote, a double quote and then another single quote. This removes the double-quotes from oldvariable, and creates newvariable without the double quotes.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2015 11:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230404#M41775</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-17T11:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Removing quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230441#M41787</link>
      <description>&lt;P&gt;How do you get to these strings&amp;nbsp;in quotes in first place?&lt;/P&gt;
&lt;P&gt;If it's you reading in some text file then these quotes could already get removed&amp;nbsp;in this extract step.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2015 22:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-quotation-marks/m-p/230441#M41787</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-17T22:22:34Z</dc:date>
    </item>
  </channel>
</rss>

