I have been trying to get it to work but I got stuk with the creation of the "have" data. I'm using the code below: *data set you want to create demo data for; %let dataSetName = filter_for_data1; *number of observations you want to keep; %let obsKeep = 100; ****************************************************** DO NOT CHANGE ANYTHING BELOW THIS LINE ******************************************************; %let source_path = https://gist.githubusercontent.com/statgeek/bcc55940dd825a13b9c8ca40a904cba9/raw/865d2cf18f5150b8e887218dde0fc3951d0ff15b/data2datastep.sas; filename reprex url "&source_path"; %include reprex; filename reprex; option linesize=max; %data2datastep(dsn=&dataSetName, file=have, obs=&obsKeep); run; data work.want; set work.have; if value ne lag(value); run; It wil not create the work.have data and I'm a bit clueless since I think I'm using the right variables. As attachement the log file
... View more