Use STATE from an application, an exec, or a CLIST.
When the STATE command is issued, new variables are set to the database location associated with the current object.
See Appendix B. QMF global variable tables for more information.