Date: Fri, 20 Mar 2009 09:37:10 -0400
Reply-To: Nathaniel.Wooding@DOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: quick question on what in= really means,
read the online sas docs, but still don't get it
In-Reply-To: <7acfa0f9-53a9-47e7-a4ad-ce141bc53b55@q11g2000yqh.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"
Barry
Close but not quite there as I read what you wrote.
The
if in1 ;
selects records only when there was a record in the original ff.ff11 data
set. In other words, if you have a record in either or both of the other
two files and they have a permno/cyear combination that is not in ff.ff11
, then that observation will not be written to the permanant data set.
HTH
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
barry.brian.barri
os@GMAIL.COM
Sent by: "SAS(r) To
Discussion" SAS-L@LISTSERV.UGA.EDU
<SAS-L@LISTSERV.U cc
GA.EDU>
Subject
quick question on what in= really
03/20/2009 09:27 means, read the online
AM sas docs, but still don't get it
Please respond to
barry.brian.barri
os@GMAIL.COM
data ff.ff11;
merge ff.ff1(in=in1) me_12 me_06;
by permno cyear;
if in1;
run;
According to docs:
http://support.sas.com/onlinedoc/913/docMainpage.jsp
in = Data set option
Creates a variable that indicates whether the data set contributed
data to the current observation
My understanding is the data set ff.ff1 by using the in statement
would =1 if me_12 and me_06 are aligned with ff.ff1 by permno cyear,
if there is a permno or a cyear that corresponds to me_12 and me_06
but not in ff.ff1 then it would =0. then by using if in1; that would
delete all the =0 and these in variables are never recorded to the
dataset???
Let me know if this is completely wrong, and I am not understanding
the in statement.
-Barry
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.