<?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: Carriage Return in a Quote? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380932#M276974</link>
    <description>&lt;P&gt;You can insert any hexcode you want. The hexcode for CR is '0D'x.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(case when t1.Line_Number=1 then 
            'The big brown dog jumped over the red fence.'||'0D'x||'Then went to bed'
            end) AS Special_Instructions;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also changed the qutoes to single quotes so that you could also insert characters like &amp;amp; and % that would be macro triggers if enclodes in double quotes.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2017 14:53:49 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-07-27T14:53:49Z</dc:date>
    <item>
      <title>Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380377#M276971</link>
      <description>&lt;P&gt;Hey all, I have the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(case when t1.Line_Number=1 then 
            "The big brown dog jumped over the red fence. Then went to bed" 
            end) AS Special_Instructions;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a special character in SAS to insert a carriage return after the period by the word "fence" ? I would like to be able to export these and similar comments into Excel as labels, but some will need carriage returns. Not sure SAS has a code to enter within the quote that will export a carriage return, or even make a carriage return within the SAS text variable. &amp;nbsp;thanks!&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;&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>Thu, 27 Jul 2017 14:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380377#M276971</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2017-07-27T14:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380470#M276972</link>
      <description>&lt;P&gt;Have you tried a '\r' or used the ASCII equivalent ('13'x)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 14:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380470#M276972</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-07-27T14:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380835#M276973</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13798"&gt;@AlanC&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure where to place those within my quote. I have tried \r, '\r' to no avail and am unsure how to enter the ascii. &amp;nbsp;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 14:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380835#M276973</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2017-07-27T14:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380932#M276974</link>
      <description>&lt;P&gt;You can insert any hexcode you want. The hexcode for CR is '0D'x.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(case when t1.Line_Number=1 then 
            'The big brown dog jumped over the red fence.'||'0D'x||'Then went to bed'
            end) AS Special_Instructions;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also changed the qutoes to single quotes so that you could also insert characters like &amp;amp; and % that would be macro triggers if enclodes in double quotes.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 14:53:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380932#M276974</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-27T14:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380997#M276975</link>
      <description>&lt;P&gt;I foudn this in another thread. To get the valid hex, use this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cr=input('0D',$hex2.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: 0D == '13'&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A valid SAS statement would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x = "Test the carriage return" || cr || right now" ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 14:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/380997#M276975</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-07-27T14:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/381070#M276976</link>
      <description>&lt;P&gt;If you want nice readbale output in excel then using a reporting procedure is the way to go:&lt;/P&gt;
&lt;PRE&gt;ods excel file="c:\xyz.xlsx";
proc report data=have nowd split="~";
  columns _all_;
  define var1 / label="Something here~which needs~Splitting";
...
run;
ods excel close;&lt;/PRE&gt;
&lt;P&gt;Its rarely a good idea to put things in the data which have no purpose other than for reporting (it just makes processing the data harder).&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 15:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/381070#M276976</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-27T15:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in a Quote?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/381713#M276977</link>
      <description>&lt;P&gt;Tom's response was partially correct. Excel does not honour the carriage return, Word does though. When I used "new line" Excel then honored it (Word as well):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when t1.Line_Number=1 then 'The big brown dog jumped over the red fence.' ||'0A'x|| 'Then went to bed' end&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jul 2017 16:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Carriage-Return-in-a-Quote/m-p/381713#M276977</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2017-07-27T16:04:39Z</dc:date>
    </item>
  </channel>
</rss>

