<?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: first.* is unitialized in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57909#M12575</link>
    <description>In order to use first. syntax, you must use a BY statement in your data step: BY code;&lt;BR /&gt;
The =1 is unnecessary, it is implied TRUE. And I don't believe you can use FIRST. together with WHERE (since WHERE does not aware of what is going on in the data step, IF is).&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Wed, 29 Oct 2008 21:49:43 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2008-10-29T21:49:43Z</dc:date>
    <item>
      <title>first.* is unitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57908#M12574</link>
      <description>I have a set of data comprising of stock code, date and stock return. i want to find the first date of every code. i use the following:&lt;BR /&gt;
proc sort data=p05;&lt;BR /&gt;
by code date;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data pp05;&lt;BR /&gt;
set p05;&lt;BR /&gt;
where FIRST.code =1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Syntax error while parsing WHERE clause.&lt;BR /&gt;
ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;
&lt;BR /&gt;
and , where to find errow 189-322?</description>
      <pubDate>Wed, 29 Oct 2008 21:09:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57908#M12574</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-10-29T21:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: first.* is unitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57909#M12575</link>
      <description>In order to use first. syntax, you must use a BY statement in your data step: BY code;&lt;BR /&gt;
The =1 is unnecessary, it is implied TRUE. And I don't believe you can use FIRST. together with WHERE (since WHERE does not aware of what is going on in the data step, IF is).&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Wed, 29 Oct 2008 21:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57909#M12575</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-10-29T21:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: first.* is unitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57910#M12576</link>
      <description>tried the following:&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=p05;&lt;BR /&gt;
by code ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data pp05;&lt;BR /&gt;
set p05;&lt;BR /&gt;
if FIRST.code ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
but still doesn't work. so i guess maybe something is wrong with my SAS. i am going to school to use another computer to try&lt;BR /&gt;
anyway, thank</description>
      <pubDate>Sun, 02 Nov 2008 22:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57910#M12576</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-11-02T22:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: first.* is unitialized</title>
      <link>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57911#M12577</link>
      <description>Hey tzsmile,&lt;BR /&gt;
you forgot to put the by variable in the datastep...&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=p05;&lt;BR /&gt;
by code ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data pp05;&lt;BR /&gt;
set p05;&lt;BR /&gt;
by code ;&lt;BR /&gt;
if FIRST.code ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
just add "by code ;"  in the datastep like i have done in the above code and you'll see your code without any errors/ warnings.</description>
      <pubDate>Mon, 03 Nov 2008 06:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/first-is-unitialized/m-p/57911#M12577</guid>
      <dc:creator>SushilNayak</dc:creator>
      <dc:date>2008-11-03T06:47:24Z</dc:date>
    </item>
  </channel>
</rss>

