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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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