SAS: lookup data inside a function/subroutine / return an array
问题 Suppose I like to do something like the following (with exemplary variable names for better readability): take a parameter InParameter and match it to the variable MyVar1 in a dataset MyData return all values for the variable MyVar2 for the filtered observations from a subroutine/function that i can use inside proc sql/datastep This is what I got so far (clearly not working): proc fcmp outlib=work.funcs.MyFunction; function MyFunction(InParameter $); array MyArray ... ; /* Here: Create an