BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Thuto
Calcite | Level 5

I'm getting an error saying "ERROR: Data set WORK.MYCLASS is not sorted in ascending sequence. The current BY group has Sex = M and the next BY group has Sex = F ". What am I supposed to do? I don't understand the error message.

data myclass;

set sashelp.class; where Age between 13 and 16;

run;

proc sort data=myclass out=myclass2;

by sex;

run;

proc freq data=myclass;

by sex;

tables age;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Please note the correction in red

 

proc freq data=myclass2;

 

MYCLASS is not sorted by sex. MYCLASS2 is sorted by sex.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Please note the correction in red

 

proc freq data=myclass2;

 

MYCLASS is not sorted by sex. MYCLASS2 is sorted by sex.

--
Paige Miller
Thuto
Calcite | Level 5
Thanks a lot