Created On:  19 May 2010

Problem:

Usually in Mainframe we use the command LOAD RESUME to add new information into a Table.  Is it possible to do same by using the XDB Migrate option of Mainframe Express?

Resolution:

Yes, it is possible to load only the new or updated rows to an existing table by using the XDB Migrate option of Mainframe Express. This can be done through Define Query in Object menu.  You have to follow the following steps:

1. Select the Define Query command on the Object menu to display an empty Query window.

2. In the upper pane of the Query window, enter a Table and AuthID for the result of the query.

3. If you want the result stored to a specific database and table space, type their names in the Database and Tablespace fields.

4. In the lower pane, type a single SELECT statement. If you want to open a saved query that you have created using SQLWizard, double-click its name in the Catalog Browser's Query tab.  You can enter any valid SELECT statement, even those containing joins and unions.

5. After you have entered a SELECT statement, click the Table/Query Options button in the toolbar or select the Table/Query Options command on the Object menu.

6. In the Query Options dialog box, specify how you want the results of this query written, then click OK. You can specify what action Migrate should take if the destination table already exists, and how many total records should be copied.   Update Insert option of "If Table Already Exists" updates the existing row, or insert new row.

7. In the Run dialog box, make sure the Execute Migrate check box is selected. If this box is not selected, Migrate will not copy any records to the destination. This option can be disabled if you want to generate SQL without performing a migration

8. When you have finished specifying the query(s), click the Run  button in the toolbar, or select the Run SQL command on the Commands menu.
Incident #2452349