LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 27 Jul 2007 17:23:23 -0400
Reply-To:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:   Re: Question about updating ID's using something other than PROC SQL
In-Reply-To:   <1185566711.996638.113970@g4g2000hsf.googlegroups.com>
Content-Type:   text/plain; charset="us-ascii"

Ryan: How will SAS know which ID needs to change to which? Unless you have some form of telepathy going, a cross-reference table seems essential to an automated process. Once you have that you can SET changes to an ID where an ID matches another ID.

For that, see http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0705D&L=sas-l&P=R33147&D=1& H=0&O=D&T=1 in the excellent SAS-L Archives.

S

-----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of donnelly.ryan.m@gmail.com Sent: Friday, July 27, 2007 4:05 PM To: sas-l@uga.edu Subject: Question about updating ID's using something other than PROC SQL

Happy Friday all,

I'm working on a program to import a data set into SAS. The records in the database cover a 12 month period and sometimes the ID's change mid way through the year so to the untrained eye the records would appear to be from two different entities. In the past I've utilized PROC SQL (update data.sampdata set var ='011301' where var= '010053';), to change the old ID to the new ID number. This method, however, creates a large amount of hand coding, something I don't want to continue for obvious reasons.

Does anyone have any suggestions for a way to update the data set without having to hand code all the equivalent ID's?

Thanks in advance for your help, enjoy the weekend and I appologize if I haven't been clear enough, I'm still a bit of a SAS n00b.

Ryan


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