<?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: Merging two datasets by ID in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897083#M354499</link>
    <description>&lt;P&gt;If you get "weird" error messages like here where SAS tells you about some unrecognized OPTION name sort where you know that SORT in your code isn't an option but a Procedure: Check for missing semicolons prior to the line of code where the error gets thrown.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1696383560044.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88567iD46AB08783B420BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1696383560044.png" alt="Patrick_0-1696383560044.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 01:39:42 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-10-04T01:39:42Z</dc:date>
    <item>
      <title>Merging two datasets by ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897004#M354470</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am trying to combine two dataset - one from REDCap that has disease information, one from an access database that contains what clinic they were found in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I have and the error message I am getting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options MSGLEVEL=I&lt;/P&gt;&lt;P&gt;proc sort data=redcap; by id; run;&lt;BR /&gt;proc sort data=octri; by ID; run;&lt;/P&gt;&lt;P&gt;**Merge both datasets into one excel**;&lt;/P&gt;&lt;P&gt;data enrollments;&lt;BR /&gt;merge redcap (in=a) octri (in=b);&lt;BR /&gt;by ID;&lt;BR /&gt;if a;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=enrollments;&lt;BR /&gt;Title 'Biobank Enrollments';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;46784 proc sort data=redcap; by id; run;&lt;BR /&gt;----&lt;BR /&gt;13&lt;BR /&gt;ERROR 13-12: Unrecognized SAS option name SORT.&lt;/P&gt;&lt;P&gt;46784! proc sort data=redcap; by id; run;&lt;BR /&gt;----&lt;BR /&gt;13&lt;/P&gt;&lt;P&gt;ERROR 13-12: Unrecognized SAS option name DATA.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;46785 proc sort data=octri; by ID; run;&lt;/P&gt;&lt;P&gt;NOTE: There were 848 observations read from the data set WORK.OCTRI.&lt;BR /&gt;NOTE: SAS sort was used.&lt;BR /&gt;NOTE: The data set WORK.OCTRI has 848 observations and 73 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.21 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;46786&lt;BR /&gt;46787 **Merge both datasets into one excel**;&lt;BR /&gt;46788&lt;BR /&gt;46789 data enrollments;&lt;BR /&gt;46790 merge redcap (in=a) octri (in=b);&lt;BR /&gt;ERROR: Variable sex has been defined as both character and numeric.&lt;BR /&gt;46791 by ID;&lt;BR /&gt;46792 if a;&lt;BR /&gt;46793 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ENROLLMENTS may be incomplete. When this step was stopped there&lt;BR /&gt;were 0 observations and 2653 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;46794&lt;BR /&gt;46795 proc print data=enrollments;&lt;BR /&gt;46796 Title 'Biobank Enrollments';&lt;BR /&gt;46797 run;&lt;/P&gt;&lt;P&gt;NOTE: No observations in data set WORK.ENROLLMENTS.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 18:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897004#M354470</guid>
      <dc:creator>grhyne</dc:creator>
      <dc:date>2023-10-03T18:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets by ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897006#M354471</link>
      <description>&lt;P&gt;Please examine your code very very carefully. You are missing a semi-colon.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 18:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897006#M354471</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-03T18:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets by ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897083#M354499</link>
      <description>&lt;P&gt;If you get "weird" error messages like here where SAS tells you about some unrecognized OPTION name sort where you know that SORT in your code isn't an option but a Procedure: Check for missing semicolons prior to the line of code where the error gets thrown.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1696383560044.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88567iD46AB08783B420BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1696383560044.png" alt="Patrick_0-1696383560044.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 01:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets-by-ID/m-p/897083#M354499</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-10-04T01:39:42Z</dc:date>
    </item>
  </channel>
</rss>

