<?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 to concatenate values and keep in macro variables to get user defined format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354051#M82749</link>
    <description>&lt;P&gt;Yes. Need complete value in macro varaible.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2017 10:58:48 GMT</pubDate>
    <dc:creator>Banu</dc:creator>
    <dc:date>2017-04-27T10:58:48Z</dc:date>
    <item>
      <title>Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354041#M82745</link>
      <description>&lt;P&gt;I have below data in X dataset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BRAND&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRICE&lt;/P&gt;&lt;P&gt;----------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --------------&lt;/P&gt;&lt;P&gt;Apple&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50000&lt;/P&gt;&lt;P&gt;Samsung&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20000&lt;/P&gt;&lt;P&gt;MI&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; 15000&lt;/P&gt;&lt;P&gt;LG&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; 35000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need a below values in 'get' macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;get value:&lt;/P&gt;&lt;P&gt;============&lt;/P&gt;&lt;P&gt;Apple(50000),Samsung(20000),MI(15000),LG(35000).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest me which one is a easiest way to do above. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 10:39:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354041#M82745</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-04-27T10:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354046#M82747</link>
      <description>&lt;P&gt;So you want get_value to be a macro variable containing the value Apple(50000),Samsung(20000),MI(15000),LG(35000)?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 10:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354046#M82747</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-27T10:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354051#M82749</link>
      <description>&lt;P&gt;Yes. Need complete value in macro varaible.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 10:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354051#M82749</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-04-27T10:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354052#M82750</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data X;
input BRAND $ PRICE;
datalines;
Apple 50000
Samsung 20000
MI 15000
LG 35000
;

data help(keep=var);
	set X;
	var = cats(BRAND,'(',PRICE,')');
run;

proc sql noprint;
	select var INTO: get separated BY ','
	from help;
quit;

%put &amp;amp;get;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354052#M82750</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-27T11:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354056#M82751</link>
      <description>&lt;P&gt;Well, as always, my first question will be why? &amp;nbsp;Macro is a text find and replace tool, it is not for data processing, that is what datasteps are for. &amp;nbsp;If you go down that route you will effectively double the complexity of your code and obfuscate it to a certain degree. &amp;nbsp;Also you will likely hit the boundaries of lengths of variables, and certain characters within there. &amp;nbsp;So I wouldn't recommed this approach. &amp;nbsp;There are numerous methods of working with data with are both more effective and simpler to work with. &amp;nbsp;Provide some background and will be able to suggest.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354056#M82751</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-27T11:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354057#M82752</link>
      <description>&lt;P&gt;Great. It's working great, Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to keep this value in email and am using below. But macro variable is not working.&lt;/P&gt;&lt;P&gt;Can you sugegst me why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x %tslit(Total sales are as follows: &amp;amp;get."&lt;/P&gt;&lt;P&gt;| mailx -s "Report"&amp;nbsp;xxxxxx@xxx.com);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting mail woth out resolving macro varibale.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354057#M82752</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-04-27T11:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354060#M82754</link>
      <description>&lt;P&gt;Sorry..Please find correct code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x %tslit(echo "Total sales are as follows: &amp;amp;get."&lt;/P&gt;&lt;P&gt;| mailx -s "Report"&amp;nbsp;xxxxxx@xxx.com);&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354060#M82754</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-04-27T11:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354061#M82755</link>
      <description>&lt;P&gt;I dont understand your question, please elaborate.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354061#M82755</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-27T11:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354066#M82757</link>
      <description>&lt;P&gt;Initially we keep the value in macro variable,now needs to include that macro variable&amp;nbsp; value in email using X coomand.&lt;/P&gt;&lt;P&gt;In that &amp;amp;get value is not resolving in X command. Please see my code in previous post.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354066#M82757</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-04-27T11:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354068#M82758</link>
      <description>&lt;P&gt;X command is for invoking Operating System commands - nothing to do with SAS - so do you have an Operating System command:&lt;/P&gt;
&lt;P&gt;%tslit&lt;/P&gt;
&lt;P&gt;Unlikely, that looks like a SAS macro call.&lt;/P&gt;
&lt;P&gt;Another problem, per my previous message, when your data gets large you will break then subject line limits. &amp;nbsp;A good way to data into an email is to put it out from a dataset:&lt;/P&gt;
&lt;PRE&gt;filename mailbox email 'someone@world.com'
  subject='Total Sales';
data _null_;
  file mailbox;
  set your_data;
  if _n_=1 then do;
    put "Hello";
    put "This is a the Total Sales";
  end;
  put _all_;
run;
filename mailbox clear;&lt;/PRE&gt;
&lt;P&gt;You can find further examples, such as attaching reports, here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/038-2008.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354068#M82758</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-27T11:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354089#M82769</link>
      <description>&lt;P&gt;I tried this way.but getting an error like connection was refsued. Don't have proper setup to execute above one.&lt;/P&gt;&lt;P&gt;Using X command other macro variables are resolving,but above macro variable is not resolving.it might due to large value or some other reason. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 12:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354089#M82769</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-04-27T12:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to concatenate values and keep in macro variables to get user defined format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354098#M82774</link>
      <description>&lt;P&gt;When you get a connection refused, your mail setup is not working at all. Verify that you can send a simple mail before you embark in more complex things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also provide the complete code of the macro %tslit, so we can get a feeling for what it's supposed to do. Note that your X statement will finish before you start sending mail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But make sure that you can send mail from SAS first.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 13:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-concatenate-values-and-keep-in-macro-variables-to/m-p/354098#M82774</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-27T13:10:22Z</dc:date>
    </item>
  </channel>
</rss>

