Why are you defining different library names between SAS environments when presumably they refer to the same data, just stored in a different location? For example Production versus Development version of the same data. If you had the same library names across your environments then you wouldn't have this problem. This is what we do where I work and it means no code changes. Also we assign all libraries in metadata, not in code - this is best practice.
... View more