<?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: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550758#M152939</link>
    <description>&lt;P&gt;RINC is defined in dataset one, not panelproj.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2019 19:38:39 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-04-12T19:38:39Z</dc:date>
    <item>
      <title>I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550741#M152934</link>
      <description>&lt;P&gt;Everything has worked well up until the point I tried to log my variable RINC. Then I get this error message:&amp;nbsp;NOTE: Variable RINC is uninitialized.&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;200 at 66:10&lt;BR /&gt;NOTE: There were 200 observations read from the data set WORK.PANELPROJ.&lt;BR /&gt;NOTE: The data set WORK.TWO has 200 observations and 9 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.07 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my full code. I hit my pathway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ibname session1 "C:\x";&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT = panelproj&lt;BR /&gt;DATAFILE = "C:\x"&lt;BR /&gt;DBMS=csv REPLACE;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc contents;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;BR /&gt;data one;&lt;BR /&gt;set panelproj;&lt;BR /&gt;if year = 2004 then cpi = 188.9;&lt;BR /&gt;if year = 2008 then cpi = 215.303;&lt;BR /&gt;if year = 2012 then cpi = 229.594;&lt;BR /&gt;if year = 2016 then cpi = 240.007;&lt;BR /&gt;RINC = INC/(CPI/100);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc contents;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means;&lt;BR /&gt;class year;&lt;BR /&gt;var RINC UR educ VT;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data two;&lt;BR /&gt;set panelproj;&lt;BR /&gt;logRINC= log(RINC);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code when I try to log my variable is not turning blue which makes me think I'm writing the code wrong. This is the way I did it in SAS studio but it may be different for SAS 9.4.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 18:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550741#M152934</guid>
      <dc:creator>khalillx</dc:creator>
      <dc:date>2019-04-12T18:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550758#M152939</link>
      <description>&lt;P&gt;RINC is defined in dataset one, not panelproj.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 19:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550758#M152939</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-04-12T19:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550766#M152941</link>
      <description>&lt;P&gt;Not sure why your variables are turning blue.&amp;nbsp; Perhaps they need medication?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot take the LOG() of a variable that doesn't exist.&amp;nbsp; You created RINC in the dataset ONE when you made it from PANELPROJ.&amp;nbsp; Why not just add this new variable to that step also?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
  set panelproj;
  if year = 2004 then cpi = 188.9;
  if year = 2008 then cpi = 215.303;
  if year = 2012 then cpi = 229.594;
  if year = 2016 then cpi = 240.007;
  RINC = INC/(CPI/100);
  logRINC= log(RINC);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you want to make a new data set them make sure to read the right input dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data two;
  set one;
  logRINC= log(RINC);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Apr 2019 19:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550766#M152941</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-12T19:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550776#M152944</link>
      <description>No need to be condescending. I'm new to SAS and am looking for help. Please do not respond to any of my posts with that kind of attitude again or you will be reported. I figured it out before you even responded anyways. You're not all that because you know how to use SAS.</description>
      <pubDate>Fri, 12 Apr 2019 20:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550776#M152944</guid>
      <dc:creator>khalillx</dc:creator>
      <dc:date>2019-04-12T20:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550777#M152945</link>
      <description>&lt;P&gt;I still have no idea what meant by a variable turning blue.&amp;nbsp; &amp;nbsp;And your response does not really clarify it either.&lt;/P&gt;
&lt;P&gt;If one of the answers was helpful mark it as the correct answer.&lt;/P&gt;
&lt;P&gt;Or if you solved it on your own then post the solution and mark your own answer as the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS Note that there was nothing condescending in my original post. I gave my diagnosis of what I thought was your problem and two ways to solve it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 20:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550777#M152945</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-12T20:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550809#M152958</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/257791"&gt;@khalillx&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Everything has worked well up until the point I tried to log my variable RINC. Then I get this error message:&amp;nbsp;NOTE: Variable RINC is uninitialized.&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;200 at 66:10&lt;BR /&gt;NOTE: There were 200 observations read from the data set WORK.PANELPROJ.&lt;BR /&gt;NOTE: The data set WORK.TWO has 200 observations and 9 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.07 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's my full code. I hit my pathway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ibname session1 "C:\x";&lt;/P&gt;
&lt;P&gt;PROC IMPORT OUT = panelproj&lt;BR /&gt;DATAFILE = "C:\x"&lt;BR /&gt;DBMS=csv REPLACE;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc contents;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;BR /&gt;data one;&lt;BR /&gt;set panelproj;&lt;BR /&gt;if year = 2004 then cpi = 188.9;&lt;BR /&gt;if year = 2008 then cpi = 215.303;&lt;BR /&gt;if year = 2012 then cpi = 229.594;&lt;BR /&gt;if year = 2016 then cpi = 240.007;&lt;BR /&gt;RINC = INC/(CPI/100);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc contents;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc means;&lt;BR /&gt;class year;&lt;BR /&gt;var RINC UR educ VT;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data two;&lt;BR /&gt;set panelproj;&lt;BR /&gt;logRINC= log(RINC);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code when I try to log my variable is not turning blue which makes me think I'm writing the code wrong. This is the way I did it in SAS studio but it may be different for SAS 9.4.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Foundation, Base or Display Manager, pick you choice for name, enhanced editor does not highlight function calls in general because most are not "keywords" like DATA,&amp;nbsp;PROC or SET.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 22:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550809#M152958</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-12T22:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: I'm trying to log my variable but I get this error message when I try: Variable is uninitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550832#M152968</link>
      <description>&lt;P&gt;Look closely at this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data two;
set panelproj;
logRINC= log(RINC);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You created RINC in dataset one, not in dataset panelproj:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
set panelproj;
if year = 2004 then cpi = 188.9;
if year = 2008 then cpi = 215.303;
if year = 2012 then cpi = 229.594;
if year = 2016 then cpi = 240.007;
RINC = INC/(CPI/100);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Apr 2019 06:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-m-trying-to-log-my-variable-but-I-get-this-error-message-when/m-p/550832#M152968</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-13T06:05:52Z</dc:date>
    </item>
  </channel>
</rss>

