<?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 versus DEQUOTE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43445#M8911</link>
    <description>From documentation for %PUT&lt;BR /&gt;
&lt;BR /&gt;
The %PUT statement displays text in different colors to generate messages that look like ERROR, NOTE, and WARNING messages generated by SAS. To display text in different colors, the first word in the %PUT statement must be ERROR, NOTE, or WARNING, followed immediately by a colon or a hyphen. You may also use the national-language equivalents of these words. When you use a hyphen, the ERROR, NOTE, or WARNING word is blanked out.&lt;BR /&gt;
&lt;BR /&gt;
Works for "regular" put and putlog too.</description>
    <pubDate>Fri, 02 Jul 2010 13:26:36 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2010-07-02T13:26:36Z</dc:date>
    <item>
      <title>COMPRESS versus DEQUOTE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43442#M8908</link>
      <description>this question occurred to me when reading the following, quoted from "Problem Note 40031: Single quotation marks have been added to internal macros in SAS® Enterprise Guide®" at &lt;A href="http://support.sas.com/kb/40/031.html" target="_blank"&gt;http://support.sas.com/kb/40/031.html&lt;/A&gt;  &lt;BR /&gt;
" ....... &lt;B&gt;&lt;I&gt;for example, &amp;amp;_clientapp resolves to 'SAS Enterprise Guide', but, in earlier versions, the same macro variable resolves to SAS Enterprise Guide.&lt;BR /&gt;
&lt;BR /&gt;
To remove the quotation marks, use %SYSFUNC, for example:&lt;BR /&gt;
&lt;BR /&gt;
title "%sysfunc(compress(&amp;amp;_clientapp,%str(%')))".   &lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
This solution is provided as an example, but would you like to comment on the more general application of [pre]    %sysfunc(compress(&amp;amp;_some_macro_var_,%str(%')))[/pre] compared with this alternative[pre]    %sysfunc(dequote(&amp;amp;_some_macro_var_))[/pre]  ??&lt;BR /&gt;
 &lt;BR /&gt;
well we are a &lt;I&gt;discussion&lt;/I&gt; forum &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Fri, 02 Jul 2010 08:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43442#M8908</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-07-02T08:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS versus DEQUOTE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43443#M8909</link>
      <description>A subtle difference occurs if the first character of the value that is operated on by DEQUOTE is not a quote then the function does not remove any quotes.  Admittedly you have to work pretty hard to make that happen.  &lt;BR /&gt;
&lt;BR /&gt;
The advantage of DEQUOTE is that is properly handles imbedded quotes and works equally well for single and double quotes.  Plus with DEQUOTE you don't have to remember how to used unmatched quotes [pre]%STR(%')[/pre]&lt;BR /&gt;
I'm not familiary with the "EG 12" but I expected either method would return the correct DEQUOTED value. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
378  data _null_;&lt;BR /&gt;
379     infile cards eof=eof;&lt;BR /&gt;
380     input m $char40.;&lt;BR /&gt;
381     call symput(cats('M',_n_),m);&lt;BR /&gt;
382     list;&lt;BR /&gt;
383     return;&lt;BR /&gt;
384   eof:&lt;BR /&gt;
385     call symputX('M0',_n_-1);&lt;BR /&gt;
386     stop;&lt;BR /&gt;
387     cards;&lt;BR /&gt;
&lt;BR /&gt;
RULE:      ----+----1----+----2----+----3----+----4&lt;BR /&gt;
388        'SAS Enterprise Guide'&lt;BR /&gt;
389          'SAS Enterprise Guide'&lt;BR /&gt;
390        'SAS Enterprise''s Guide'&lt;BR /&gt;
391        "SAS Enterprise's Guide"&lt;BR /&gt;
392           "SAS Enterprise's Guide"&lt;BR /&gt;
&lt;BR /&gt;
393  ;;;;&lt;BR /&gt;
394     run;&lt;BR /&gt;
395  %macro p;&lt;BR /&gt;
396     %do i = 1 %to &amp;amp;m0;&lt;BR /&gt;
397        %put NOTE: \&amp;amp;&amp;amp;M&amp;amp;I\;&lt;BR /&gt;
398        %put NOTE- \%qsysfunc(compress(%bquote(&amp;amp;&amp;amp;m&amp;amp;i),%str(%')))\;&lt;BR /&gt;
399        %put NOTE- \%qsysfunc(dequote(%bquote(&amp;amp;&amp;amp;m&amp;amp;i)))\;&lt;BR /&gt;
400        %end;&lt;BR /&gt;
401     %mend p;&lt;BR /&gt;
402  %p&lt;BR /&gt;
NOTE: \'SAS Enterprise Guide'                  \&lt;BR /&gt;
      \SAS Enterprise Guide                  \&lt;BR /&gt;
      \SAS Enterprise Guide\&lt;BR /&gt;
NOTE: \  'SAS Enterprise Guide'                \&lt;BR /&gt;
      \  SAS Enterprise Guide                \&lt;BR /&gt;
      \  'SAS Enterprise Guide'                \&lt;BR /&gt;
NOTE: \'SAS Enterprise''s Guide'               \&lt;BR /&gt;
      \SAS Enterprises Guide               \&lt;BR /&gt;
      \SAS Enterprise's Guide\&lt;BR /&gt;
NOTE: \"SAS Enterprise's Guide"                \&lt;BR /&gt;
      \"SAS Enterprises Guide"                \&lt;BR /&gt;
      \SAS Enterprise's Guide\&lt;BR /&gt;
NOTE: \   "SAS Enterprise's Guide"             \&lt;BR /&gt;
      \   "SAS Enterprises Guide"             \&lt;BR /&gt;
      \   "SAS Enterprise's Guide"             \&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 02 Jul 2010 12:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43443#M8909</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-07-02T12:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS versus DEQUOTE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43444#M8910</link>
      <description>bemused by %put NOTE- effect! [pre]     %put NOTE- ...........[/pre]   not printing NOTE in the log.&lt;BR /&gt;
Is there an explanation of this functionality anywhere?</description>
      <pubDate>Fri, 02 Jul 2010 12:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43444#M8910</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-07-02T12:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS versus DEQUOTE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43445#M8911</link>
      <description>From documentation for %PUT&lt;BR /&gt;
&lt;BR /&gt;
The %PUT statement displays text in different colors to generate messages that look like ERROR, NOTE, and WARNING messages generated by SAS. To display text in different colors, the first word in the %PUT statement must be ERROR, NOTE, or WARNING, followed immediately by a colon or a hyphen. You may also use the national-language equivalents of these words. When you use a hyphen, the ERROR, NOTE, or WARNING word is blanked out.&lt;BR /&gt;
&lt;BR /&gt;
Works for "regular" put and putlog too.</description>
      <pubDate>Fri, 02 Jul 2010 13:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43445#M8911</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-07-02T13:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS versus DEQUOTE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43446#M8912</link>
      <description>pardon me, I should have done a better job of ... rtfm</description>
      <pubDate>Fri, 02 Jul 2010 13:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/COMPRESS-versus-DEQUOTE/m-p/43446#M8912</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-07-02T13:28:29Z</dc:date>
    </item>
  </channel>
</rss>

