Data Source Explorer

The Data Source Explorer view shows the DB2 objects that you specify, such as tables, views, and aliases. This article describes how to use the Data Source Explorer.

Add a Host

A TCP/IP host is used for connecting to the DB2 database using TSO or CICS login. You can add and remove a host from the Preferences window during login.

Follow these steps:

  1. Click the Window menu.

  2. Select Preferences from the drop-down menu.
    The Preference Window appears.

  3. Enter a host name in the Host field and click Add.
    The new host is added to the host list.

  4. Click Apply.

The new host is added and saved to the preferences.

You can add and remove the active subsystems in a host from the Data Source Explorer.

Add a Subsystem

Follow these steps:

  1. Right-click on the logical partition (LPAR) in the Data Source Explorer and click Add Subsystem(s)... You can also double-click the logical partition to add a subsystem.

  2. Select one or more subsystems from the Subsytem(s) Selection window.

  3. Click OK.

The selected subsystem IDs (SSIDs) are added to the host in the Data Source Explorer window.

Remove a Subsystem

To remove a subsystem from the logical partition, right-click on a subsystem in the Data Source Explorer and select Remove.

Load Objects

Use the load objects option to fetch DB2 objects (tables, views, and aliases) from the database. The loaded objects are displayed in a hierarchical fashion in the Data Source Explorer. Search for an object by typing the object name in the Type object name field.

Follow these steps:

  1. Right-click on a subsystem ID (SSID) in the Data Source Explorer.

  2. Click Load Objects.
    A Load Objects dialog appears.

  3. Complete the following Object Selection Criteria:

    1. Enter an object name or a creator. You can use the wildcard character % as a part of object or creator name.

      • If you specify creator and leave the object name field as blank, all the objects for the creator appear in the Data Source Explorer.

      • If you specify an object name and leave the creator field blank, all the objects for different creators appear in the Data Source Explorer.

    2. (Optional) Select one or more object types from the Object Types list. By default, all the object types (tables, views, and aliases) are selected.

  4. Click OK.

The objects that meet the search criteria are loaded and displayed in the Data Source Explorer.

Open an Object

You can edit multiple objects in different windows simultaneously in both edit and read-only mode. To edit an object, first open it in read-only mode.

Follow these steps:

  1. Double-click an object from Data Source Explorer.
    The Layout-Filter dialog appears.

  2. (Optional) Specify the search criteria to apply a filter on the object. For information about how to apply a filter see Filters (DB2). You can filter by the following criteria:

    • Column Selection

    • Where Clause

    • Order By

  3. Click OK.
    The object data is loaded and displayed in the Data Window in read-only mode as specified.

Edit an Object

After you have opened an object in read-only mode, you can enable editing to perform various functions. To enable an object for editing, right-click anywhere in the Data Window and select Enable Edit Mode.

Manage Objects

Objects in Data Source Explorer are displayed in a hierarchical fashion. To expand and collapse the objects under a host, subsystem, or creator click the node icon.

Example:

Host1
Subsystem1
Creator1
Tables
Table1
Table2
Views
View1
View2
Aliases
Alias1
Alias2

Sort Objects

Sort the objects of a creator or the objects within a subsystem, alphabetically from Data Source Explorer. Click the AZ sort icon and select either Ascending or Descending.

Search for Objects

To search for DB2 objects use the search bar from the Data Source Explorer. Type an object name in the Type object name area of Data Source Explorer. The search results instantly appear as you type.

View Object Properties

The properties of an object define various attributes, such as name, type, and the location of an object. To view the properties of an object, right-click on an object from Data Source Explorer and click Properties. The properties of the selected object are displayed in the Properties window.