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