<?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 to concatenate the values with two macro values as variable names in data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461418#M117382</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148952"&gt;@daisy6&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want a table as data set. The percents and&amp;nbsp;pass number in the exact same cell&amp;nbsp; of the dataset.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The idea of having a cell in a SAS data set that contains the text "&lt;SPAN&gt;23 (53.4%)" seems utterly useless to me. What possible use of such a data set could there be?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, if you really want to do this, you create a data set where the calculations are done and there are numbers in each cell, 23 in one cell, 53.4 in another cell (PROC SUMMARY could do this easily), and then using a data step, convert these values to characters and concatenate them. I do not have the time today to advise further on the exact code. Please see if you can make this work based upon the description I have given.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2018 20:32:21 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-05-10T20:32:21Z</dc:date>
    <item>
      <title>how to concatenate the values with two macro values as variable names in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461327#M117339</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like the below,&lt;/P&gt;&lt;P&gt;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var2&amp;nbsp; &amp;nbsp; var3&amp;nbsp; &amp;nbsp;var4&amp;nbsp; &amp;nbsp; &amp;nbsp;var5&lt;/P&gt;&lt;P&gt;npass&amp;nbsp; &amp;nbsp; &amp;nbsp;23&amp;nbsp; &amp;nbsp; &amp;nbsp; 34&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 27&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 43&lt;/P&gt;&lt;P&gt;nfail&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20&amp;nbsp; &amp;nbsp; &amp;nbsp; 18&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 37&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16&lt;/P&gt;&lt;P&gt;npper&amp;nbsp; &amp;nbsp; &amp;nbsp; 23/43 34/52&amp;nbsp; &amp;nbsp;27/64&amp;nbsp; 43/59&lt;/P&gt;&lt;P&gt;nfper&amp;nbsp; &amp;nbsp; &amp;nbsp; 20/43&amp;nbsp; &amp;nbsp;18/52&amp;nbsp; 37/64&amp;nbsp; &amp;nbsp;16/59&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I want is :&lt;/P&gt;&lt;P&gt;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var5&lt;/P&gt;&lt;P&gt;npass&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;23 (53.4%)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 34 (65.4%)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 27 (42.2%)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 43 (72.9%)&lt;/P&gt;&lt;P&gt;nfail&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20(46.6%)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18 (34.6%)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 37 (57.8%)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 (27.1%)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;npper is passing percent , nfper is failing percent. the Var2&amp;nbsp; &amp;nbsp;var3 var4 var5' s names are macro values. those macro values changes month by month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 14:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461327#M117339</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-05-10T14:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate the values with two macro values as variable names in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461336#M117343</link>
      <description>&lt;P&gt;Do you want a table (for example from PROC REPORT) as output, or data set as output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In either case, do you want the percents in the&amp;nbsp;&lt;EM&gt;exact same cell of the table/data set&lt;/EM&gt;, or are the percents in a different column?&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>Thu, 10 May 2018 14:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461336#M117343</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-10T14:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate the values with two macro values as variable names in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461347#M117349</link>
      <description>&lt;P&gt;I want a table as data set. The percents and&amp;nbsp;pass number in the exact same cell&amp;nbsp; of the dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 15:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461347#M117349</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-05-10T15:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate the values with two macro values as variable names in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461418#M117382</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148952"&gt;@daisy6&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want a table as data set. The percents and&amp;nbsp;pass number in the exact same cell&amp;nbsp; of the dataset.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The idea of having a cell in a SAS data set that contains the text "&lt;SPAN&gt;23 (53.4%)" seems utterly useless to me. What possible use of such a data set could there be?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, if you really want to do this, you create a data set where the calculations are done and there are numbers in each cell, 23 in one cell, 53.4 in another cell (PROC SUMMARY could do this easily), and then using a data step, convert these values to characters and concatenate them. I do not have the time today to advise further on the exact code. Please see if you can make this work based upon the description I have given.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 20:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/461418#M117382</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-10T20:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate the values with two macro values as variable names in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/462344#M117706</link>
      <description>&lt;P&gt;PaigeMiller, thank you for your suggestions.&amp;nbsp; I used your method to solve that problem.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 13:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-the-values-with-two-macro-values-as-variable/m-p/462344#M117706</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2018-05-15T13:27:05Z</dc:date>
    </item>
  </channel>
</rss>

