Last post! I implemented a proper SQL solution and a Hash solution (for comparison + learning). => Using SQL: All it takes is pretty much one "proc sql create table". Really easy to understand, however... performance... => Using Hash: First time implementation is difficult, but the performance is insane compared to SQL. For around 7,000 data, Hash needs less than a second, while proc SQL needs around 16 seconds. Having written this as a macro, it will be even easy+fast to loop through this macro and assess different ranges and the impact on the plot Regarding the "if 0 then set sample". My code currently does not have this and the values are still correct. However, I understand what it is used for now and I suppose its better to include. I found another description in some pdf file on the internet: "SAS needs to know about the variables that are present in a hash table before it can use them. You can either use a LENGTH statement to define the variables, their types and lengths, or simply use a SET statement like this one. This SET statement will be read at compile time, information about the variables in the datasets will be extracted, but the statement will never actually execute due to the “if 0” condition." Thanks everyone!
... View more