Date: Wed, 17 Nov 2004 16:59:55 -0500
Reply-To: "Khan, Muhammad Z." <MKhan@OXHP.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Khan, Muhammad Z." <MKhan@OXHP.COM>
Subject: Assign a unique id
Content-Type: text/plain; charset="us-ascii"
Dear SAS list;
I have been given a database with 5 columns. The first column
contains the provider id, the 2nd, 3rd , 4th and 5th column also
contains the provider id. The goal is to create a new field called
newid and assign a unique ID based on 2nd thru 5th columns. The newid
is the function of column 2nd thru 5th. Please see below for an
example. Any help from the list how to accomplish this will be
appreciated. I'm using SAS V8.
id id1 id2 id3 id4 newid
P1489426 1
P3095609 P3095609 P3095609 P3095609
P3095609 2
P3209470 P3209470 P3209470 P3209470
P3209470 3
OP143 OP143 OP143 OP143 OP143 4
P2494549 P2494549 P2494549 P2494549
5
P505623 P505623 P2494549 P2494549 5
P1885336 P1885336 P1885336 P1885336
P1885336 6
P3250604 P1885336 P3250604 P1885336
P1885336 6
P666159 P666159 P666159 P666159 7
DO0925 DO0925 DO0925 DO0925 8
P2047850 DO0925 DO0925 DO0925 8
P2503027 P2503027 P2503027 P2503027
P2503027 9
P3009851 P2503027 P2503027 P2503027
P2503027 9
P3098029 P2503027 P3098029 P3098029
P2503027 9
CS154 CS154 CS154 CS154 CS154 10
P1108674 CS154 P1108674 P1108674 CS154 10
P1316217 CS154 P1316217 CS154 CS154 10
P2822362 CS154 CS154 CS154 CS154 10
MS389 MS389 MS389 MS389 CS154 11
P2575373 MS389 P2575373 P2575373 CS154 11
P2590717 MS389 P2590717 P2590717 CS154 11
P495231 P495231 P495231 P495231 12
Thanks
M Khan
|