Using QMF

Example 4: Connecting to a new location using remote unit of work and distributed unit of work

You want to connect to the DB2 UDB for OS/390 subsystem, DALLAS, and QMF is running at the DB2 for VM location, CHICAGO. While connected to the DALLAS database location, you also want to access data from the sample inventory table CHARLE.INVENTORY at the DB2 UDB for OS/390 subsystem NEWYORK.

  1. Use remote unit of work support.

    To connect to location DALLAS:

  2. Use distributed unit of work with a three-part name.

    You can access data from the DB2 UDB for OS/390 subsystem, NEWYORK, yet remain connected to the DB2 UDB for OS/390 subsystem at DALLAS. To do this, you must use a three-part name (or an alias for that name) within the SQL statements.

    For example, use a SELECT query like this:

        SELECT *
        FROM NEWYORK.CHARLE.INVENTORY
    
  3. Use distributed unit of work with an alias.

    With the following SQL statement, you can also specify an alias for the three-part name within the query:

        CREATE ALIAS MONTHLY FOR NEWYORK.CHARLE.INVENTORY
    

    Enter the query, and then run it at the location you to which you are connected. In this example, you are connected to the DALLAS location.

    After you create the alias, you can use it in a SELECT query like this:

        SELECT *
        FROM MONTHLY
    


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]