Connection subroutines

Use connections to connect to and disconnect from the queue manager.