<?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: ERROR: Variable Gender has been defined as both character and numeric. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535800#M6536</link>
    <description>&lt;P&gt;Please post more information about the datasets you are using. Posting data as data-step using datalines will help use to help you. Additionally explain what you want as result, which values are expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could rename the numeric Gender variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  set first second third (rename=(Gender=GenderNum));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Feb 2019 05:54:40 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2019-02-15T05:54:40Z</dc:date>
    <item>
      <title>ERROR: Variable Gender has been defined as both character and numeric.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535784#M6533</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am completing an assignment where I have to use the set statement to combine three different data sets. One set is assigned with 0 for males, the second set assigns 1 for females, and the third is left blank for unknown gender. These were .sas files that I uploaded into SAS university edition. When I tried to use a set statement to combine them I get the error "ERROR: Variable Gender has been defined as both character and numeric."&lt;/P&gt;&lt;P&gt;i believe it is because the unknown data set for Gender has the variable as a character (see screenshot).&lt;/P&gt;&lt;P&gt;Is there any way of fixing this or changing this in sas so that it is numeric?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-02-14 at 9.05.00 PM.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27168iEFB701CA3816184A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-02-14 at 9.05.00 PM.png" alt="Screen Shot 2019-02-14 at 9.05.00 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also attached the unknown file below.&lt;/P&gt;&lt;P&gt;I apologize for the question, I am very new to SAS and trying but it has been a struggle.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 02:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535784#M6533</guid>
      <dc:creator>klj81</dc:creator>
      <dc:date>2019-02-15T02:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable Gender has been defined as both character and numeric.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535789#M6534</link>
      <description>If you know that GENDER values are always blank in the third data set, just get rid of it when combining the data sets:&lt;BR /&gt;&lt;BR /&gt;set first second third (drop=gender);</description>
      <pubDate>Fri, 15 Feb 2019 03:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535789#M6534</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-15T03:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable Gender has been defined as both character and numeric.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535790#M6535</link>
      <description>Unfortunately I can’t drop it from the final table because that is part of the assignment to sort by gender and print the results. The problem is with the numerical value from two sets and the character value from one I can’t figure out how to get them to combine...</description>
      <pubDate>Fri, 15 Feb 2019 03:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535790#M6535</guid>
      <dc:creator>klj81</dc:creator>
      <dc:date>2019-02-15T03:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable Gender has been defined as both character and numeric.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535800#M6536</link>
      <description>&lt;P&gt;Please post more information about the datasets you are using. Posting data as data-step using datalines will help use to help you. Additionally explain what you want as result, which values are expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could rename the numeric Gender variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  set first second third (rename=(Gender=GenderNum));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Feb 2019 05:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535800#M6536</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-02-15T05:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable Gender has been defined as both character and numeric.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535805#M6537</link>
      <description>My suggestion doesn't drop gender from the final table.  It keeps the values found in the first 2 tables but omits values found in the third table.  That's the reason the program needs gender to be blank in the third table.  If it's not blank all the time, we need to know more about what's in it.</description>
      <pubDate>Fri, 15 Feb 2019 06:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/535805#M6537</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-15T06:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable Gender has been defined as both character and numeric.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/536054#M6572</link>
      <description>&lt;P&gt;Thanks so much for the help. This worked perfectly!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 20:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Variable-Gender-has-been-defined-as-both-character-and/m-p/536054#M6572</guid>
      <dc:creator>klj81</dc:creator>
      <dc:date>2019-02-15T20:56:21Z</dc:date>
    </item>
  </channel>
</rss>

