<?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 Building a Table with Column+CATX? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Building-a-Table-with-Column-CATX/m-p/358810#M64339</link>
    <description>&lt;P&gt;Hi All - Long time lurker, first time poster. Normally googling is enough to answer any questions I have, but I'm having a hard time locating this one (I'm worried it's because the answer is so obvious&amp;nbsp;no one ever bothers to ask). Apologies in advance as I fumble through this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my work, I use SAS Enterprise Guide 7.1, relying mostly on the query building tool, but I occasionally mix in programs where the ask is beyond the standard Enterprise Guide functionality. I'm self taught so my knowledge is pretty remedial. I'm trying to build a step where I can concatenate a series of columns in addition to including other non-concatenated columns. I don't want to do it in the Query Builder because this is a project I run regularly and the number of columns might vary from project to project, so I'm trying to take out the manual-aspect of it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've figured out how to do the CAT step, but being a programming newbie I'm not sure how to incorporate an additional column (outside of the CATX), my output is just the CATX column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have googled the heck out of it, and I'm sure it's something simple, but because I'm self taught I think I'm&amp;nbsp;just not experienced enough to figure it out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have:&amp;nbsp;&lt;/P&gt;&lt;P&gt;COLUMNA&amp;nbsp;| Column1 | Column2|Column 3&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What I want:&lt;/P&gt;&lt;P&gt;COLUMNA | CATX(COLUMNS1-3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am getting:&lt;/P&gt;&lt;P&gt;CATX(COLUMNS1-3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code to get the last one, I just need to figure out how to bring COLUMNA&amp;nbsp;in, in addition to my concatenated column which is coming through great:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT&amp;nbsp;(keep=Column);
length Column $200;
set HAVE;
Column = catx(',',of Column:);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance for any help you might be able to offer, and sorry again if this is a super remedial question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2017 18:26:00 GMT</pubDate>
    <dc:creator>AnissaG</dc:creator>
    <dc:date>2017-05-15T18:26:00Z</dc:date>
    <item>
      <title>Building a Table with Column+CATX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Building-a-Table-with-Column-CATX/m-p/358810#M64339</link>
      <description>&lt;P&gt;Hi All - Long time lurker, first time poster. Normally googling is enough to answer any questions I have, but I'm having a hard time locating this one (I'm worried it's because the answer is so obvious&amp;nbsp;no one ever bothers to ask). Apologies in advance as I fumble through this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my work, I use SAS Enterprise Guide 7.1, relying mostly on the query building tool, but I occasionally mix in programs where the ask is beyond the standard Enterprise Guide functionality. I'm self taught so my knowledge is pretty remedial. I'm trying to build a step where I can concatenate a series of columns in addition to including other non-concatenated columns. I don't want to do it in the Query Builder because this is a project I run regularly and the number of columns might vary from project to project, so I'm trying to take out the manual-aspect of it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've figured out how to do the CAT step, but being a programming newbie I'm not sure how to incorporate an additional column (outside of the CATX), my output is just the CATX column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have googled the heck out of it, and I'm sure it's something simple, but because I'm self taught I think I'm&amp;nbsp;just not experienced enough to figure it out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have:&amp;nbsp;&lt;/P&gt;&lt;P&gt;COLUMNA&amp;nbsp;| Column1 | Column2|Column 3&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What I want:&lt;/P&gt;&lt;P&gt;COLUMNA | CATX(COLUMNS1-3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am getting:&lt;/P&gt;&lt;P&gt;CATX(COLUMNS1-3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code to get the last one, I just need to figure out how to bring COLUMNA&amp;nbsp;in, in addition to my concatenated column which is coming through great:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT&amp;nbsp;(keep=Column);
length Column $200;
set HAVE;
Column = catx(',',of Column:);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance for any help you might be able to offer, and sorry again if this is a super remedial question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 18:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Building-a-Table-with-Column-CATX/m-p/358810#M64339</guid>
      <dc:creator>AnissaG</dc:creator>
      <dc:date>2017-05-15T18:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Building a Table with Column+CATX?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Building-a-Table-with-Column-CATX/m-p/358812#M64340</link>
      <description>&lt;P&gt;Your resulting file only contains the column named COLUMN because you told SAS to ONLY keep that column&lt;/P&gt;
&lt;PRE&gt;data WANT (keep=Column);&lt;/PRE&gt;
&lt;P&gt;If you wanted to keep everything, just use:&lt;/P&gt;
&lt;PRE&gt;data WANT;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, Analyst Finder.com&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 18:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Building-a-Table-with-Column-CATX/m-p/358812#M64340</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-05-15T18:37:00Z</dc:date>
    </item>
  </channel>
</rss>

