LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 20 Aug 2007 12:02:29 -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: SAS Datastep Help
Comments: To: Tamarah Smith-Dyer <tfdyer@GMAIL.COM>
In-Reply-To:  <200708201531.l7KCY4o7012804@malibu.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Tamarah

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 question.

Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

Tamarah Smith-Dyer <tfdyer@GMAIL.COM To > SAS-L@LISTSERV.UGA.EDU Sent by: "SAS(r) cc Discussion" <SAS-L@LISTSERV.U Subject GA.EDU> SAS Datastep Help

08/20/2007 11:31 AM

Please respond to Tamarah Smith-Dyer <tfdyer@GMAIL.COM >

To anyone who can help,

I have been attempting run the datastep below, and it will not drop subjects with year=2006???

DATA DATA; SET DATA; IF YEAR NE 2006 THEN OUTPUT; RUN;

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.

Much thanks! Tamarah

----------------------------------------- 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.


Back to: Top of message | Previous page | Main SAS-L page