I spent quite some time searching for a way to reject variables in SAS Model Studio using code, but I couldn’t find anything that explained it directly. That’s why I’m sharing it here. It turns out the solution is actually very simple. You can change the role of variables without altering the original dataset or going through Manage Variables. It’s also much easier to reject dozens of variables this way, instead of manually selecting them one by one in Manage Variables. Just use the following macro for each variable you want to adjust: %dmcas_metaChange(NAME=var_1, ROLE=REJECTED); This makes it possible to reuse the same table across different pipelines while still controlling which variables are included or excluded in each specific flow. In this image, it is possible to see a simple pipeline that compares two models: one with all variables and the other with some rejected variables. Hope this helps some one!
... View more