Yes, the second block of code works. But does the the libname statement actually establish a connection to the database, or is the connection only established when the connect to statement is invoked? To complicate matters, in the second block of code, if I remove the "libname DW clear" statement, then it fails to work unless the second libname also uses "DW" instead of "DWH". I'm not certain whether that supports your theory or not.
... View more