To capture changes from an IMS™ database, you must create a relational
table that maps to that database. You can also create a view on the table
to filter record types or to filter rows and columns.
Before you begin
- Configure the data server where you plan to run the correlation service
that will process change data from your IMS database.
- Create a metadata catalog.
- Decide which segment to map and the required path for navigating to the
segment from a physical root or index.
- Configure a connection between the data server and your IMS database, if
you plan to generate and run the DDL to create the table and optionally the
view in the metadata catalog.
- Ensure that the IMS DBDs folder in your project contains a database definition
file (DBD) that lists the segments from which you want to select the fields
to map to columns.
- Ensure the COBOL Copybooks folder in your project
contains a copybook for each of the IMS segments that you want to map to.
Restrictions
About this task
For more information about creating tables and views that map to IMS databases,
see the related links for IMS syntax diagrams and for views.
Procedure
To create an IMS table and optionally a view for change
capture:
- Map your IMS database to a relational table and optionally create
a view by using the New IMS Table wizard.
- Open this wizard by right-clicking either the database in your
data design project or one of the schemas within the database. Select Add
Classic Object > IMS table.
- Select the DBD file to base the table on.
- Specify that the table is for change capture.
- Choose whether to create a view on the table.
- Provide information about how to access the IMS database.
- For the each segment that is in the path, specify a COBOL copybook,
select the desired 01 level if there is more than one, and select the elements
that you want to map as columns.
- If you are creating a view, specify the criteria for the WHERE
clause.
When you finish the wizard, the new table appears under the selected
schema. If you created a view, it also appears under the selected schema.
- Optional: Modify the table properties or add privileges.
Select the table and make any changes in the Properties view.
- Optional: Generate the DDL for the table. You
can generate the DDL later. You can also generate the DDL for all of the objects
within the same schema. See Generating DDL.
- Right-click the table and select Generate DDL.
- In the Generate DDL wizard, follow these
steps:
- Choose to generate CREATE statements.
- Choose to generate DDL for tables.
- Name the file in which to save the DDL within your project.
- Choose whether to run the DDL on a data server. After you run the DDL,
check the Data Output view to determine whether the DDL
ran successfully.
- Choose whether to open the DDL for editing.
- Optional: If you ran the DDL successfully on a data
server, validate the table by running a test query against your IMS database. Be
sure that the data server is connected to that database.
- In the Database Explorer, search your data server for the schema
that you created the table in. Expand the schema and expand the Tables folder.
- Right-click the table and select Data > Sample
Contents.
- Check the Data Output view to determine
whether the test query ran successfully.
- Optional: If you created a view, generate the DDL for
the view. You can generate the DDL later. You can also generate
the DDL for all of the objects within the same schema. See Generating DDL.
- Right-click the view and select Generate DDL.
- In the Generate DDL wizard, follow these
steps:
- Choose to generate CREATE and ALTER statements.
- Choose to generate DDL for views.
- Name the file in which to save the DDL within your project.
- Choose whether to run the DDL on a data server. After running the DDL,
check the Data Output view to determine whether the DDL
ran successfully.
- Choose whether to open the DDL for editing.
- Optional: If you ran the DDL successfully on a data
server, validate the view by running a test query against your IMS database. Ensure
that the data server is connected to that database.
- In the Database Explorer, search your data server for the schema
that you created the view in. Expand the schema and expand the Views folder.
- Right-click the view and select Data > Sample
Contents.
- Check the Data Output view to determine
whether the test query ran successfully.