<?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: How do we put multiple variables into a single column in proc report? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541919#M74151</link>
    <description>&lt;P&gt;If the variables are already formatted, use vvalue(variable) in catx. If not, use put-function, to apply formats while combining.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2019 09:30:34 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2019-03-11T09:30:34Z</dc:date>
    <item>
      <title>How do we put multiple variables into a single column in proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541900#M74148</link>
      <description>I have a dataset with variables site,subjid,race,ethinicity,sex. How do i get them all in one column using proc report. My output should contain site\subjid\race\ethnicity\sex in one column</description>
      <pubDate>Mon, 11 Mar 2019 07:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541900#M74148</guid>
      <dc:creator>sneha_dodle</dc:creator>
      <dc:date>2019-03-11T07:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do we put multiple variables into a single column in proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541904#M74149</link>
      <description>&lt;P&gt;Maybe using compute statement, but it is easier to&amp;nbsp; create one variable using a data step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Untested code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.combined;
  set have;
  
  length combined $ 100; /* add the length of the variables to avoid data-loss */
  
  combined = catx('\', site, subjid, race, ethnicity, sex);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541904#M74149</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-11T07:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do we put multiple variables into a single column in proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541918#M74150</link>
      <description>How do i apply formats those variables listed in the catx function?&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Mar 2019 09:27:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541918#M74150</guid>
      <dc:creator>sneha_dodle</dc:creator>
      <dc:date>2019-03-11T09:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do we put multiple variables into a single column in proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541919#M74151</link>
      <description>&lt;P&gt;If the variables are already formatted, use vvalue(variable) in catx. If not, use put-function, to apply formats while combining.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 09:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541919#M74151</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-11T09:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do we put multiple variables into a single column in proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541938#M74152</link>
      <description>&lt;P&gt;If you want the data concatenated for a report, then it is a good idea to do this in a dataset before the proc report step.&amp;nbsp; Have a variable specifically for the concatenated data say:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  length demo $200;
  demo=catx("\",site,subjid,race,ethnicity,sex);
run;&lt;/PRE&gt;
&lt;P&gt;Then proc report that.&amp;nbsp; Whilst proc report can do computed, you will want to have that information in the dataset you store for double programming/QC.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 10:41:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/541938#M74152</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-03-11T10:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do we put multiple variables into a single column in proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/542130#M74158</link>
      <description>&lt;P&gt;Example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example of desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise we are likely to get many "that doesn't work" from you because we have to make a lot of assumptions about values involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, proc report is going to want a single "column" to be of the same type with a single format for each cell of the format with exceptions for computed summaries.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 17:25:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-we-put-multiple-variables-into-a-single-column-in-proc/m-p/542130#M74158</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-11T17:25:50Z</dc:date>
    </item>
  </channel>
</rss>

