Thank you, Rick, for this very clear and thorough explanation.

Now it is not a mystery anymore. Now, I clearly see a disconnect between defining and storing a function as a three-level entity (outlib=libref.dataset.package) and inability to reference that 3-level entity when using a function (options cmplib=libref.dataset;) in a data step. The wrapper solution when functions can be referenced by package.funcname within another PROC FCMP is valid but hardly efficient as it creates another layer of complexity and makes data step code environment-dependent (you can't simply migrate code y_Dev = ChooseA(x, "Dev"); from Development to Production without having to modify the code to code y_Dev = ChooseA(x, "Prod"). I think the better practice would be either to store function versions in different data sets (libref.prod_func, libref.dev_func) or in different libraries (prodlib.func, devlib.func) and not rely on packages at all. I would consider them as "vestigial" elements of the PROC FCMP evolution and always name them as "_" (or any other valid special name) just to satisfy the outlib= syntax (e.g. outlib=prodlib.myfunctions._ ).