<?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: can you ignore an apostrophe in a %put when commenting to log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836641#M330802</link>
    <description>&lt;P&gt;Thanks it worked.&amp;nbsp; It had a side effect of breaking the code coloring scheme (in sas studio).&amp;nbsp; To work around that I added an apostrophe commented out directly after it like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let date_today=&amp;amp;sysdate;&lt;BR /&gt;%put %bquote(today's date is &amp;amp;date_today and &amp;amp;sysdate..);*';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;before:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sas text coloring issue.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75838i15CCD75D48C67E15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas text coloring issue.png" alt="sas text coloring issue.png" /&gt;&lt;/span&gt;after:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sas text coloring issue work around.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75839iE5ABE3444F2D5058/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas text coloring issue work around.png" alt="sas text coloring issue work around.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 04:43:42 GMT</pubDate>
    <dc:creator>deboershapes</dc:creator>
    <dc:date>2022-10-04T04:43:42Z</dc:date>
    <item>
      <title>can you ignore an apostrophe in a %put when commenting to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836625#M330796</link>
      <description>&lt;P&gt;i want to write a comment to the log and i want to use an apostrophe in my comment.&lt;/P&gt;&lt;P&gt;below is a sample code illuminating the issue.&lt;/P&gt;&lt;P&gt;the first %put statement using double quotes as a work around but the comment in the log will have the double quotes and this maybe undesirable. the second %put statement fails and causes problems going forward in the code for the third %put statement because it is interpreted a using single quotes and thus is expecting a closing single quote.&amp;nbsp; is there a way to use an apostrophe in this situation and have it be ignored as a single quotes string initiator?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code sample:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let x=5;
%let date_today=&amp;amp;sysdate;
%put "today's date is: &amp;amp;date_today and &amp;amp;sysdate.";
%put today's date is: &amp;amp;date_today and &amp;amp;sysdate.;
%put my number x is: &amp;amp;x.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 02:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836625#M330796</guid>
      <dc:creator>deboershapes</dc:creator>
      <dc:date>2022-10-04T02:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: can you ignore an apostrophe in a %put when commenting to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836629#M330798</link>
      <description>&lt;P&gt;Use macro quoting. Such as %bquote() which allows unbalanced quotes.&lt;/P&gt;
&lt;PRE&gt;422  %put %bquote(today's date is: %sysfunc(today(),date9.).);
today's date is: 03OCT2022.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 03:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836629#M330798</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-04T03:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: can you ignore an apostrophe in a %put when commenting to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836641#M330802</link>
      <description>&lt;P&gt;Thanks it worked.&amp;nbsp; It had a side effect of breaking the code coloring scheme (in sas studio).&amp;nbsp; To work around that I added an apostrophe commented out directly after it like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let date_today=&amp;amp;sysdate;&lt;BR /&gt;%put %bquote(today's date is &amp;amp;date_today and &amp;amp;sysdate..);*';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;before:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sas text coloring issue.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75838i15CCD75D48C67E15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas text coloring issue.png" alt="sas text coloring issue.png" /&gt;&lt;/span&gt;after:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sas text coloring issue work around.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75839iE5ABE3444F2D5058/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas text coloring issue work around.png" alt="sas text coloring issue work around.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 04:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-you-ignore-an-apostrophe-in-a-put-when-commenting-to-log/m-p/836641#M330802</guid>
      <dc:creator>deboershapes</dc:creator>
      <dc:date>2022-10-04T04:43:42Z</dc:date>
    </item>
  </channel>
</rss>

