<?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: COMPRESS( X,  &amp;quot;'&amp;quot;) vs. COMPRESS(X, &amp;quot;&amp;quot;&amp;quot;). in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27138#M4914</link>
    <description>In your example:&lt;BR /&gt;
 And what about X="A' and X='A"? &lt;BR /&gt;
This will throw an error.Unbalanced quotes,</description>
    <pubDate>Tue, 08 Dec 2009 19:59:58 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2009-12-08T19:59:58Z</dc:date>
    <item>
      <title>COMPRESS( X,  "'") vs. COMPRESS(X, """).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27136#M4912</link>
      <description>Can any experienced SAS-programmer confirm that &lt;BR /&gt;
&lt;BR /&gt;
Y1=COMPRESS( X, "'" ) and  Y2=COMPRESS(X, """ ) will give the same result whether or not the character in X is surrounded by single or double quotation remarks?&lt;BR /&gt;
&lt;BR /&gt;
I clarify: In first expression:  &lt;B&gt;" ' "&lt;/B&gt;. In the second expression: &lt;B&gt;" " "&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
I.E., is it true that&lt;BR /&gt;
&lt;BR /&gt;
if X='A' then Y1=A and Y2=A&lt;BR /&gt;
&lt;BR /&gt;
and &lt;BR /&gt;
&lt;BR /&gt;
if X="A" then Y1=A and Y2=A&lt;BR /&gt;
&lt;BR /&gt;
And what about X="A' and X='A"?</description>
      <pubDate>Mon, 07 Dec 2009 20:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27136#M4912</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-07T20:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS( X,  "'") vs. COMPRESS(X, """).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27137#M4913</link>
      <description>Suggest you try the logic to determine the SAS behavior.  For consideration, your Y2 assignment statement is improperly coded, where you are using the same character as the delimiter *AND* also in your constant string -- so you must have two consecutive double-quote marks.  As you have coded the Y2 assignment statement, SAS will eventually issue an diagnostic message about unbalanced quotation marks or something similar.&lt;BR /&gt;
&lt;BR /&gt;
Also, your "I.E. " reference to A is as a SAS variable and not a constant -- you have never declared a SAS variable named A (neither character or SAS-default numeric).&lt;BR /&gt;
&lt;BR /&gt;
Suggest you heavy-up on reading DOC about COMPRESS function and take SAS DATA step processing for a ride -- use some PUTLOG _ALL_;  commands and some addditional conditional diagnostic statements, such as:&lt;BR /&gt;
&lt;BR /&gt;
* you fill in expression below, as needed. ;&lt;BR /&gt;
IF &lt;EXPRESSION&gt; THEN PUTLOG "YEP";&lt;BR /&gt;
ELSE PUTLOG "NOPE";&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/EXPRESSION&gt;</description>
      <pubDate>Mon, 07 Dec 2009 23:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27137#M4913</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-07T23:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS( X,  "'") vs. COMPRESS(X, """).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27138#M4914</link>
      <description>In your example:&lt;BR /&gt;
 And what about X="A' and X='A"? &lt;BR /&gt;
This will throw an error.Unbalanced quotes,</description>
      <pubDate>Tue, 08 Dec 2009 19:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-X-quot-quot-vs-COMPRESS-X-quot-quot-quot/m-p/27138#M4914</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-12-08T19:59:58Z</dc:date>
    </item>
  </channel>
</rss>

