BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
qwerty12
Fluorite | Level 6
data ttspilot_fmt;
set n2p.tts_pilot_uid_092917 end=eof;
if MPIN ='0000103759' then delete; 
start = strip(UID);
label = "Y";
fmtname = "$ttsuid";
keep start label fmtname;
output;
if eof then do;
  start = 'other';
  label = ' ';
  output;
end;
run;

proc format cntlin=ttspilot_fmt;
run;

Error - For format $TTSUID, this range is repeated, or values overlap: U461405348103759-U461405348103759.

Error - For format $TTSUID, this range is repeated, or values overlap: U461405348103759-U461405348103759.

can anyone guide where could be exact issue, where to do changes in code part to overcome this error

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

My guess is that the input data set has duplicate values. You can remove the duplicate values by using the NODUPKEY option on PROC SORT:

proc sort data=n2p.tts_pilot_uid_092917 nodupkey out=Want;
by UID;
run;

 

Then use the WANT data set to create the format.

 

If that doesn't work, please post 4-5 observations of the UID variable so we can see the form of the data.

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

My guess is that the input data set has duplicate values. You can remove the duplicate values by using the NODUPKEY option on PROC SORT:

proc sort data=n2p.tts_pilot_uid_092917 nodupkey out=Want;
by UID;
run;

 

Then use the WANT data set to create the format.

 

If that doesn't work, please post 4-5 observations of the UID variable so we can see the form of the data.

qwerty12
Fluorite | Level 6
using NODUPKEY option on PROC SORT by start worked
Thank you

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2039 views
  • 0 likes
  • 2 in conversation