I hope I understand your question right. You would use DCUF SET DBNAME XXXXX at the CV prompt before executing the dialog. It will then be using that DB.
You can issue a DCUF command from inside a dialog by linking to RHDCUF00. See manual "Callable Services." You could then invoke a different DB by menu option.
The manual I am referring to is called "Callable Services." Chapter 4 is titled "Invoking DCMT and DCUF Commands from Programs." Your code looks correct. I will attempt to attach the manual to this post.
Attachment Removed. The distriution of copyrighted material is both against the policy of this forum and is illegal.