<?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 Problem with SAS not recognising variable during DATA step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248544#M46693</link>
    <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just having a problem with SAS not recognising one of my variables whilst I am trying to encode a new variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically the code looks like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if CTA_LAD=1 OR CTA_CX or CTA_RCA=1 then CTAPP=1;&lt;BR /&gt;else CTAPP=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, SAS seems to be creating a new variable for CTA_CX filled with missing values. As far as I can see I am typing the exact variable name as it appears in my original datasheets and the SAS output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not doing this for any of my other recoding steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your support!&lt;/P&gt;</description>
    <pubDate>Sun, 07 Feb 2016 13:08:13 GMT</pubDate>
    <dc:creator>RahulM</dc:creator>
    <dc:date>2016-02-07T13:08:13Z</dc:date>
    <item>
      <title>Problem with SAS not recognising variable during DATA step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248544#M46693</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just having a problem with SAS not recognising one of my variables whilst I am trying to encode a new variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically the code looks like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if CTA_LAD=1 OR CTA_CX or CTA_RCA=1 then CTAPP=1;&lt;BR /&gt;else CTAPP=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, SAS seems to be creating a new variable for CTA_CX filled with missing values. As far as I can see I am typing the exact variable name as it appears in my original datasheets and the SAS output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not doing this for any of my other recoding steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your support!&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2016 13:08:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248544#M46693</guid>
      <dc:creator>RahulM</dc:creator>
      <dc:date>2016-02-07T13:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SAS not recognising variable during DATA step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248546#M46694</link>
      <description>&lt;P&gt;Addit: there was a missing space in the name that I only saw on proc print!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I am having a different problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try:&lt;/P&gt;&lt;P&gt;DATA;&lt;/P&gt;&lt;P&gt;rename&lt;BR /&gt;'CTA(space)_CX'n=CTA_CX;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It replaces CTA(space)_CX with all missing values and creates a new variable CTA_CX which is also populated with missing values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2016 13:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248546#M46694</guid>
      <dc:creator>RahulM</dc:creator>
      <dc:date>2016-02-07T13:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SAS not recognising variable during DATA step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248549#M46696</link>
      <description>Ig seems easier to start over than trying to repair something you are not really sure about.&lt;BR /&gt;I think that you are missing a =1 in your initial code?&lt;BR /&gt;Check your input data set carefully so you match variable names, data types and values.</description>
      <pubDate>Sun, 07 Feb 2016 13:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248549#M46696</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-07T13:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SAS not recognising variable during DATA step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248550#M46697</link>
      <description>&lt;P&gt;Run a proc contents to see your variable names instead of labels. I'm not sure your condition is specified correctly, I think you want what's below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if CTA_LAD=1 OR CTA_CX=1 or CTA_RCA=1 then CTAPP=1;
else CTAPP=0;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2016 13:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248550#M46697</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-07T13:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SAS not recognising variable during DATA step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248591#M46704</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're correct about that bit of code being incorrect, but the renaming step is where the error is occuring in that it is creating the new variable. I copied the exact title from a PROC PRINT statement and its not working. I guess I'll just edit the original spreadsheet and try again, would have been interesting to know why this was happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers again!&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2016 23:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SAS-not-recognising-variable-during-DATA-step/m-p/248591#M46704</guid>
      <dc:creator>RahulM</dc:creator>
      <dc:date>2016-02-07T23:41:35Z</dc:date>
    </item>
  </channel>
</rss>

