thomas-rasmussen / sas_macros

SAS macros
Creative Commons Zero v1.0 Universal
5 stars 4 forks source link

hash_match: variable names treated as case-sensitive #37

Closed thomas-rasmussen closed 3 years ago

thomas-rasmussen commented 3 years ago

In some cases, variables are treated as case-sensitive. For example if a variable is named ID, but "id ne _ctrl_id" is used in the match_inexact parameter, this will result in errors caused by https://github.com/thomas-rasmussen/sas_macros/blob/27074931c0461bef42aa79b3436e17b1d5d3bfcb/hash_match.sas#L650 where &i_var = id but the name value is ID.

Fix this by making by using something like lowcase(name) = lowcase(&i_var). Also check the rest of the macro to ensure this can not happen elsewhere too, and add some additional tests.