Date: Mon, 20 Aug 2007 12:02:29 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: SAS Datastep Help
Content-Type: text/plain; charset="US-ASCII"
Please run proc contents
Proc contents data=data;
and check to see whether year is stored as character or numeric or is even
present. Let us know the results and we will be better able to answer your
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Sent by: "SAS(r) cc
GA.EDU> SAS Datastep Help
Please respond to
To anyone who can help,
I have been attempting run the datastep below, and it will not drop
subjects with year=2006???
IF YEAR NE 2006 THEN OUTPUT;
I have tried several different ways of approaching the problem (using year
ne 2006, putting 2006 in quotes- even though it is formatted as numeric,
creating a new var that equals 1 if year =2006, else equals 0 and using
this new var in the output statement, etc.).
Does anyone have any suggestions as to why this code may not be leading to
the desired outcome, or how to overcome the problem??? I have looked in
my SAS books, and racked my brain, but I cannot come up with why this may
not be working, let alone a solution.
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.