<?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 Concatinating data from on variable while adding special characters. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470579#M70890</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've come across a little predicament and require a little assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list of numbers in one variable i.e&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What i want to do is put the whole list into 1 observation but place quotations around them and put "or" in between.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so the output observation using the example above would show as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"12345" or "12345"&amp;nbsp;&lt;SPAN&gt;or "12345"&amp;nbsp;or "12345"&amp;nbsp;or "12345"&amp;nbsp;or "12345"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this possible?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Many thanks in advance&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Stret&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2018 12:42:24 GMT</pubDate>
    <dc:creator>Stretlow</dc:creator>
    <dc:date>2018-06-15T12:42:24Z</dc:date>
    <item>
      <title>Concatinating data from on variable while adding special characters.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470579#M70890</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've come across a little predicament and require a little assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list of numbers in one variable i.e&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;12345&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What i want to do is put the whole list into 1 observation but place quotations around them and put "or" in between.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so the output observation using the example above would show as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"12345" or "12345"&amp;nbsp;&lt;SPAN&gt;or "12345"&amp;nbsp;or "12345"&amp;nbsp;or "12345"&amp;nbsp;or "12345"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this possible?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Many thanks in advance&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Stret&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 12:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470579#M70890</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2018-06-15T12:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Concatinating data from on variable while adding special characters.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470580#M70891</link>
      <description>&lt;P&gt;Use the quote() and catx() functions:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input number;
cards;
12345
12345
12345
12345
12345
12345
;
run;

data want;
length result $100;
do until (eof);
  set have end=eof;
  result = catx(' or ',result,quote(put(number,5.)));
end;
drop number;
run;


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jun 2018 12:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470580#M70891</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-15T12:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Concatinating data from on variable while adding special characters.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470583#M70892</link>
      <description>&lt;P&gt;Perfect!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you Kind Sir.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 12:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470583#M70892</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2018-06-15T12:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Concatinating data from on variable while adding special characters.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470584#M70893</link>
      <description>&lt;P&gt;I would wonder why?&amp;nbsp; Just syntactically, you be be better having an in() usable list rather than a list of "or"'s.&amp;nbsp; However if your using lists then far simpler to leave in a dataset an use that rather than try to code the mechanics of macro lists.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 13:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470584#M70893</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-15T13:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Concatinating data from on variable while adding special characters.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470660#M70900</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I would wonder why?&amp;nbsp; Just syntactically, you be be better having an in() usable list rather than a list of "or"'s.&amp;nbsp; However if your using lists then far simpler to leave in a dataset an use that rather than try to code the mechanics of macro lists.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi There.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your input... the output of this is to be used for something very specific and where it requires it to be in that format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you though&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 17:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concatinating-data-from-on-variable-while-adding-special/m-p/470660#M70900</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2018-06-15T17:22:58Z</dc:date>
    </item>
  </channel>
</rss>

