<?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: join three variables, print to new line with a backslash in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428342#M105757</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class=sys||'/'||'0D0A'x||hiterm||'/'||'0D0A'x|| lowterm;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Jan 2018 12:54:15 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-01-17T12:54:15Z</dc:date>
    <item>
      <title>join three variables, print to new line with a backslash</title>
      <link>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428123#M105665</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have three variables, that need to be joined to one variable and output to new line separate by backslash.&amp;nbsp; Sorry...so weird to explain!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data final1;&lt;BR /&gt;length class $300.;&lt;BR /&gt;set final;&lt;/P&gt;
&lt;P&gt;class=sys||'/'||'~n/'||hiterm||'/'||'~n/'|| lowterm;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=final1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to one variable 'class' with concatenated values of sys, hiterm,lowterm on unique line when '/' encountered:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLASS&lt;/P&gt;
&lt;P&gt;sys/&lt;/P&gt;
&lt;P&gt;hiterm/&lt;/P&gt;
&lt;P&gt;lowterm&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or sample data output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLASS&lt;/P&gt;
&lt;P&gt;Investigation/&lt;/P&gt;
&lt;P&gt;Metabolism/&lt;/P&gt;
&lt;P&gt;Hyperglycemia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428123#M105665</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2018-01-16T18:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: join three variables, print to new line with a backslash</title>
      <link>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428127#M105668</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; You only show one statement. You don't show the rest of your code. Are you using PROC PRINT, PROC REPORT??&lt;BR /&gt;&lt;BR /&gt; You don't show any ODS statement -- I guess that you are using ODS because ~n is the old ESCAPECHAR way of inserting a new line into a text string to show line breaks in ODS HTML, RTF or PDF output. But not all destinations use ESCAPECHAR, so it would be useful to see more code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's an ODS HTML example using the new ESCAPECHAR syntax and showing the output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17908i1EF5073FE890438E/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.png" alt="example.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428127#M105668</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-01-16T18:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: join three variables, print to new line with a backslash</title>
      <link>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428129#M105669</link>
      <description>&lt;P&gt;Use CATX instead to concatenate the variables together, it's cleaner and easier to follow.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428129#M105669</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-16T18:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: join three variables, print to new line with a backslash</title>
      <link>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428342#M105757</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class=sys||'/'||'0D0A'x||hiterm||'/'||'0D0A'x|| lowterm;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jan 2018 12:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/join-three-variables-print-to-new-line-with-a-backslash/m-p/428342#M105757</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-01-17T12:54:15Z</dc:date>
    </item>
  </channel>
</rss>

