<?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: Need help in combing cells in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344520#M9756</link>
    <description>It is something like this:&lt;BR /&gt;&lt;BR /&gt;id var_a var_b var_c&lt;BR /&gt;1 This is an NA apple&lt;BR /&gt;2 US is a great country&lt;BR /&gt;3 NA NA NA&lt;BR /&gt;&lt;BR /&gt;And the output after the code is:&lt;BR /&gt;&lt;BR /&gt;id output&lt;BR /&gt;1 NA&lt;BR /&gt;2&lt;BR /&gt;3 NA&lt;BR /&gt;</description>
    <pubDate>Mon, 27 Mar 2017 06:46:08 GMT</pubDate>
    <dc:creator>jakkam143aditya</dc:creator>
    <dc:date>2017-03-27T06:46:08Z</dc:date>
    <item>
      <title>Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344504#M9750</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to combine couple of cells in excel to one cell without loosing the data. The limit for each excel cell is limited so I have to create multiple variables for it. But I want to combine everything into one variable in sas for my analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data is text, lots of text.&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;Data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id var_a var_b var_c var_d&lt;/P&gt;&lt;P&gt;1 &amp;nbsp;aaa.. &amp;nbsp;bbbb.. ccc... ddd..&lt;/P&gt;&lt;P&gt;2 &amp;nbsp;eee.. &amp;nbsp;fff.. &amp;nbsp; &amp;nbsp; &amp;nbsp; ggg.. hhh..&lt;/P&gt;&lt;P&gt;3 &amp;nbsp;iii... &amp;nbsp; &amp;nbsp; jjj.. &amp;nbsp; &amp;nbsp; &amp;nbsp; kkk.. &amp;nbsp;lll...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id output&lt;/P&gt;&lt;P&gt;1 &amp;nbsp;aaa..bbbb..ccc...ddd..&lt;/P&gt;&lt;P&gt;2 &amp;nbsp;eee..fff..ggg..hhh..&lt;/P&gt;&lt;P&gt;3 &amp;nbsp;iii...jjj..kkk..lll...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(...) means data is full upto it's limit in excel cell. Each row is a single id so I need not to worry about id's also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set present;&lt;/P&gt;&lt;P&gt;length output $32767;&lt;/P&gt;&lt;P&gt;output = catx(' ', var_a, var_b, var_c, var_d);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;print data test;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to create new column but text is not getting copied into it. Just (..) are displaying in every row.&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>Mon, 27 Mar 2017 04:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344504#M9750</guid>
      <dc:creator>jakkam143aditya</dc:creator>
      <dc:date>2017-03-27T04:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344507#M9751</link>
      <description>&lt;P&gt;data have;&lt;BR /&gt;input id var_a $ var_b $ var_c $ var_d $;&lt;BR /&gt;datalines;&lt;BR /&gt;1 aaa bbbb ccc ddd&lt;BR /&gt;2 eee fff ggg hhh&lt;BR /&gt;3 iii jjj kkk lll&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select id, catx(' ',var_a,var_b,var_c) from have;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 05:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344507#M9751</guid>
      <dc:creator>lakshmi_74</dc:creator>
      <dc:date>2017-03-27T05:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344512#M9752</link>
      <description>&lt;P&gt;I already have the data imported, so I skipped the first part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select id, catx(' ',var_a,var_b,var_c) from have;&lt;BR /&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;But the answer in the cells is either blank or na (some cells have it). The data is really huge with text content in var_a, var_b, var_c, var_d. Huge in the sense (in excel each cell limit is 32767 words and it has that much amount, so I created extra columns for additional data). I know I am almost there from my previous methos and this method but couldn't figure out to display the whole text.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thank You&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:11:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344512#M9752</guid>
      <dc:creator>jakkam143aditya</dc:creator>
      <dc:date>2017-03-27T06:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344514#M9753</link>
      <description>&lt;P&gt;can you share the output what you are getting?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344514#M9753</guid>
      <dc:creator>lakshmi_74</dc:creator>
      <dc:date>2017-03-27T06:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344515#M9754</link>
      <description>&lt;P&gt;It's something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id output&lt;/P&gt;&lt;P&gt;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; -There is text here in the original data&lt;/P&gt;&lt;P&gt;2&amp;nbsp; NA&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;-This has text before NA&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&lt;/P&gt;&lt;P&gt;4&amp;nbsp; NA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similar for other observations also&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344515#M9754</guid>
      <dc:creator>jakkam143aditya</dc:creator>
      <dc:date>2017-03-27T06:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344517#M9755</link>
      <description>&lt;P&gt;can you share input data aswell?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344517#M9755</guid>
      <dc:creator>lakshmi_74</dc:creator>
      <dc:date>2017-03-27T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344520#M9756</link>
      <description>It is something like this:&lt;BR /&gt;&lt;BR /&gt;id var_a var_b var_c&lt;BR /&gt;1 This is an NA apple&lt;BR /&gt;2 US is a great country&lt;BR /&gt;3 NA NA NA&lt;BR /&gt;&lt;BR /&gt;And the output after the code is:&lt;BR /&gt;&lt;BR /&gt;id output&lt;BR /&gt;1 NA&lt;BR /&gt;2&lt;BR /&gt;3 NA&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344520#M9756</guid>
      <dc:creator>jakkam143aditya</dc:creator>
      <dc:date>2017-03-27T06:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344523#M9757</link>
      <description>&lt;P&gt;data have;&lt;BR /&gt;input id var_a $ var_b $ var_c $ var_d $ var_e $;&lt;BR /&gt;datalines;&lt;BR /&gt;1 This is an NA apple&lt;BR /&gt;2 US is a great country&lt;BR /&gt;3 NA NA NA&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;data have;&lt;BR /&gt;set have;&lt;BR /&gt;array var_all var_a--var_e;&lt;BR /&gt;do i=1 to dim(var_all);&lt;BR /&gt;if var_all(i) eq 'NA' then var_all(i)=' ';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=have;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select id,var_a||var_b||var_c||var_d||var_e as var from have;&lt;BR /&gt;run;&lt;BR /&gt;proc print;run;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344523#M9757</guid>
      <dc:creator>lakshmi_74</dc:creator>
      <dc:date>2017-03-27T06:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344632#M9758</link>
      <description>&lt;P&gt;I still have a problem, output column cannot show the required text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I use the append function here by any chance?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 14:04:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344632#M9758</guid>
      <dc:creator>jakkam143aditya</dc:creator>
      <dc:date>2017-03-27T14:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344653#M9759</link>
      <description>proc append is used for combine two datasets.&lt;BR /&gt;Your case you have to combine columns into a string. Are you reading data properly into a SAS table from excel. If is, then after implementing the above code what outpput you are getting?</description>
      <pubDate>Mon, 27 Mar 2017 14:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344653#M9759</guid>
      <dc:creator>lakshmi_74</dc:creator>
      <dc:date>2017-03-27T14:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344654#M9760</link>
      <description>&lt;P&gt;Small confusion on proc append, thank you for clarifying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After implementing the above code, I am getting digit 3 in every cell in the output for my data.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 14:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344654#M9760</guid>
      <dc:creator>jakkam143aditya</dc:creator>
      <dc:date>2017-03-27T14:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in combing cells</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344655#M9761</link>
      <description>Please check your SAS data whether it is reading '3' aswell.</description>
      <pubDate>Mon, 27 Mar 2017 14:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Need-help-in-combing-cells/m-p/344655#M9761</guid>
      <dc:creator>lakshmi_74</dc:creator>
      <dc:date>2017-03-27T14:58:37Z</dc:date>
    </item>
  </channel>
</rss>

