<?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: append a value to an existing value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/append-a-value-to-an-existing-value/m-p/290925#M60259</link>
    <description>&lt;P&gt;Well, I am not following your text there very well, but the easiest way to append a value to an existing one is to use the string cat functions, e.g:&lt;/P&gt;
&lt;P&gt;catx('-',match,"42");&lt;/P&gt;
&lt;P&gt;The above is an eample of the catx() function. &amp;nbsp;The first parameter shows the delimiter, thats the character(s) which will divide each of the following elements. &amp;nbsp;After that is the elements. &amp;nbsp;Now if match is empty you will just get "42", no delimier as there is only one value, if match has something then it will go match + "-" + "42".&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 09:12:53 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-08-11T09:12:53Z</dc:date>
    <item>
      <title>append a value to an existing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/append-a-value-to-an-existing-value/m-p/290921#M60257</link>
      <description>&lt;P&gt;Hi @ll,&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/38862"&gt;@ll&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I append a value to an existing value? I want to look up a value from a column_1 in a column_2 and everytime there's a match it should write a specific value to a column_3. The tricky part (for me right now) is that, if an observation already got a specific value in column_3, the new match should append at the end of the first match with a "-".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the final Table_1, I could use the "Block_done_with_scan" variable to mark all values in V1 and V2 as belonging to specific code 42.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table_0:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table_1:&lt;/P&gt;&lt;P&gt;V1 | V2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V1 | V2 | Match | Block_done_with_scan&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; | 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; | 2&amp;nbsp;&amp;nbsp; | 42-42&amp;nbsp; | 42&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; | 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; | 1&amp;nbsp;&amp;nbsp; | 42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 42&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; | 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; | 2&amp;nbsp;&amp;nbsp; | 42-42&amp;nbsp; | 42&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/append-a-value-to-an-existing-value/m-p/290921#M60257</guid>
      <dc:creator>chewy_chicken78</dc:creator>
      <dc:date>2016-08-11T09:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: append a value to an existing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/append-a-value-to-an-existing-value/m-p/290925#M60259</link>
      <description>&lt;P&gt;Well, I am not following your text there very well, but the easiest way to append a value to an existing one is to use the string cat functions, e.g:&lt;/P&gt;
&lt;P&gt;catx('-',match,"42");&lt;/P&gt;
&lt;P&gt;The above is an eample of the catx() function. &amp;nbsp;The first parameter shows the delimiter, thats the character(s) which will divide each of the following elements. &amp;nbsp;After that is the elements. &amp;nbsp;Now if match is empty you will just get "42", no delimier as there is only one value, if match has something then it will go match + "-" + "42".&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:12:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/append-a-value-to-an-existing-value/m-p/290925#M60259</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-11T09:12:53Z</dc:date>
    </item>
  </channel>
</rss>

