<?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: combining two datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/combining-two-datasets/m-p/76613#M16579</link>
    <description>the data step that does the combining can do the numeric to character conversion.&lt;BR /&gt;
 For example, suppose the sas data has a string containing a numeric key like credit card number (but shorter, say length 9), and excel provides that in a numeric column: [pre]data together ;&lt;BR /&gt;
   set sas_data excel_data( rename=( key=nkey) in= fromexcel); &lt;BR /&gt;
   if fromexcel then key= put(  nkey, best9.);&lt;BR /&gt;
   drop nkey ;&lt;BR /&gt;
run ;[/pre]&lt;BR /&gt;
does this look like what's wanted?&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
    <pubDate>Fri, 23 Oct 2009 16:12:39 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2009-10-23T16:12:39Z</dc:date>
    <item>
      <title>combining two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/combining-two-datasets/m-p/76612#M16578</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
This is probably a basic question, but I cannot seem to find the answer. I have 2 datasets, one is SAS dataset and the other is an .xls file. Both files have the same variables. I need to combine the two datasets into one. This is obviously very simple. &lt;BR /&gt;
&lt;BR /&gt;
Data number3;&lt;BR /&gt;
set number1 number2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, one of the variables is assigned as both character and numeric, therefore not allowing the data to combine. Is there another way to combine these or is there a way to convert variables to char or numeric without changing the variable name? Thanks in advance for any help people can provide.</description>
      <pubDate>Fri, 23 Oct 2009 15:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/combining-two-datasets/m-p/76612#M16578</guid>
      <dc:creator>Aar684</dc:creator>
      <dc:date>2009-10-23T15:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: combining two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/combining-two-datasets/m-p/76613#M16579</link>
      <description>the data step that does the combining can do the numeric to character conversion.&lt;BR /&gt;
 For example, suppose the sas data has a string containing a numeric key like credit card number (but shorter, say length 9), and excel provides that in a numeric column: [pre]data together ;&lt;BR /&gt;
   set sas_data excel_data( rename=( key=nkey) in= fromexcel); &lt;BR /&gt;
   if fromexcel then key= put(  nkey, best9.);&lt;BR /&gt;
   drop nkey ;&lt;BR /&gt;
run ;[/pre]&lt;BR /&gt;
does this look like what's wanted?&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
      <pubDate>Fri, 23 Oct 2009 16:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/combining-two-datasets/m-p/76613#M16579</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2009-10-23T16:12:39Z</dc:date>
    </item>
  </channel>
</rss>

