SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Creating a unique ID based on and old ID, sequential only between persons (that may have >1 entry)

Reply
New Contributor
Posts: 3

Creating a unique ID based on and old ID, sequential only between persons (that may have >1 entry)

[ Edited ]

 I'm looking for a way to create a unique Identifier that will account for duplicates of a client based on an old client ID.  Please see below.

I tried a do loop but it just hung up on me.  Does anyone know code for this. Thanks.

 

Old _ClientID    NewID

564                         1

564                         1

345                         2

367                         3

321                         4

111                         5

111                         5

111                         5

PROC Star
Posts: 1,584

Re: Creating a unique ID based on and old ID, sequential only between persons (that may have >1 e

data want;

set have;

by old_clientid;

if first.old_clientid then NewID+!;

run;

Ask a Question
Discussion stats
  • 1 reply
  • 80 views
  • 1 like
  • 2 in conversation