Hi,
Iam getting below error,even though the data is sorted on id column.please help
ERROR: BY variables are not properly sorted on data set WORK.data.
a=1 b=1 DATE1=31OCT2007 end_date=. date3=01OCT1941 date4=01MAR2013
reward=0.00 Amt=. amt1=1,614.00 amt2=941.50
date5=01AUG1990 date6=01MAR2013 ID=6GK ID=VWD ID1=345
78 The SAS System 11:11 Wednesday, October 9, 2019
Code= Num=cccc
STATUS= FIRST.ID=1 LAST.ID=1 _ERROR_=1 _N_=9661
NOTE: The SAS System stopped processing this step because of errors.
NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.
NOTE: There were 9662 observations read from the data set WORK.DATA.
NOTE: There were 3 observations read from the data set WORK.data.
WARNING: The data set WORK.W5V may be incomplete. When this step was stopped there were 9660 observations and 80 variables.
NOTE: Compressing data set WORK.W5V decreased size by 68.60 percent.
Compressed is 76 pages; un-compressed would require 242 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.04 seconds
How do you know that the data is sorted by ID?
Iam using sort transformation to sort the data based on ID column please and sort was running fine please,kindly help
Can you post your code please?
Did you make sure BOTH datasets are sorted?
Run a proc contents on both of the datasets.
If in doubt, a simple data step with by will check if a dataset is correctly sorted.
Hint:
when you anonymize a log, don't use just "data". Make sure we can see where the log was redacted by using something like XXXXXXX or REDACTED or similar.
In SAS logs, you won't find a lowercase dataset name.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.