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 (July 2009, 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 Jul 2009 08:28:43 -0500
Reply-To:     Joe Matise <snoopy369@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Matise <snoopy369@GMAIL.COM>
Subject:      Re: Data cleansing and part duplication
Comments: To: Jeli <jeli0703@hotmail.co.uk>
In-Reply-To:  <f3fda7be-bdf9-4755-82ba-554e3c8a51e3@c36g2000yqn.googlegroups.com>
Content-Type: text/plain; charset=windows-1252

Do you know what the correct industry is, ahead of time, or do you need to calculate it on the fly?

If you need to calculate it on the fly then you shouuld do a PROC FREQ or use PROC SQL to do a count, then sort the resulting dataset by the count, and change the other rows in that frequency dataset to some other value; then merge back onto the main dataset.

If you know it ahead of time, just check for the value, and modify it. No reason to use arrays that I can think of.

-Joe

On Mon, Jul 20, 2009 at 7:01 AM, Jeli <jeli0703@hotmail.co.uk> wrote:

> I am building a super dataset based on 5 different datasets from > around the business, appending them one on top of the other (the > formats are identical) > > The problem arises when the same IDs have different critical > information ie > > Dataset ID industry amount > datasetA 1 banking £50 > datasetA 1 banking £50 > datasetA 1 banking £50 > datasetB 1 services £100 > datasetC 2 retail £10 > > in this example they are all legitimate rows but ID 1 has shouldn’t > have two different industries. > > What I am trying to achieve is to scan the dataset and identify where > ID is the same and the industry is different and then rename the ID > to 1a. > Is there a way of using a scan function and an array?? >


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