<?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 How to convert all numeric variables into characters and concatenate the values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50114#M13628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=10 to 11;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n1=i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n2=i+8;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n3=i+5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n4=i+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n5=2*i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array nums(*) _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; newv=catx(' ',of nums(*));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Nov 2011 13:48:32 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-11-18T13:48:32Z</dc:date>
    <item>
      <title>How to convert all numeric variables into characters and concatenate the values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50111#M13625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset with some unknow number of numeric variables (&amp;gt;10) and character variables (&amp;gt;20). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is how to convert all the numeric values into character values, and then contatenate these values into a single string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 10:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50111#M13625</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-11-18T10:19:26Z</dc:date>
    </item>
    <item>
      <title>How to convert all numeric variables into characters and concatenate the values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50112#M13626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You could put all the variables into an array using the _numeric_ key-word.&lt;/P&gt;&lt;P&gt;Concatenation can you do in a do loop using the dim() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 11:20:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50112#M13626</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2011-11-18T11:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert all numeric variables into characters and concatenate the values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50113#M13627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; have(drop=i);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; i=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;11&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;n1=i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;n2=i+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;8&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;n3=i+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;n4=i+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;n5=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;*i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; new $ &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;200&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; _num(*) &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;_numeric_&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new=catt(of _num(*));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 13:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50113#M13627</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2011-11-18T13:42:11Z</dc:date>
    </item>
    <item>
      <title>How to convert all numeric variables into characters and concatenate the values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50114#M13628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=10 to 11;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n1=i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n2=i+8;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n3=i+5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n4=i+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n5=2*i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array nums(*) _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; newv=catx(' ',of nums(*));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 13:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50114#M13628</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-18T13:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert all numeric variables into characters and concatenate the values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50115#M13629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ARRAY isn't necessary. Instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Courier New;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;length&lt;/SPAN&gt; newv $ &lt;SPAN style="color: #008080;"&gt;&lt;STRONG&gt;200&lt;/STRONG&gt;&lt;/SPAN&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Courier New;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; newv=catx(&lt;SPAN style="color: #800080;"&gt;' '&lt;/SPAN&gt;,of _numeric_) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;art297 wrote:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=10 to 11;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n1=i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n2=i+8;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n3=i+5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n4=i+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; n5=2*i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array nums(*) _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; newv=catx(' ',of nums(*));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 14:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-convert-all-numeric-variables-into-characters-and/m-p/50115#M13629</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2011-11-18T14:04:43Z</dc:date>
    </item>
  </channel>
</rss>

