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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2112 views
  • 0 likes
  • 2 in conversation