Adding tables from VSAM or IMS data sources to Data Gate for watsonx
The process of adding tables is similar for all supported data sources. However, some of the characteristics of VSAM and IMS data sources require your attention.
Before you begin
Before you can add a table to be synchronized by Data Gate for watsonx, complete the following steps:
- Using the Classic Data Architect,
map your VSAM or IMS data to a relational table. For this purpose:
- Connect the Classic Data Architect to your z/OS® system. This comprises the following steps:
- Import the z/OS certificate into the keystore of your Classic Data Architect.
- Open the physical data model and add the classic objects, which can be VSAM or IMS tables.
- Use the appropriate COBOL copybook for the generation of table mappings and extra statements, such as grant statements.
VSAM example:
CREATE TABLE SCHEMA.EMPLOYEE DBTYPE VSAM DS "SYS5.CLASICDC.V113.VSAM.EMPLOYEE" ( ENAME SOURCE DEFINITION DATAMAP OFFSET 0 LENGTH 20 DATATYPE C USE AS CHAR(20), PHONE SOURCE DEFINITION DATAMAP OFFSET 20 LENGTH 4 DATATYPE UF USE AS INTEGER, MAILID SOURCE DEFINITION DATAMAP OFFSET 25 LENGTH 6 DATATYPE C USE AS CHAR(6), SALARY SOURCE DEFINITION DATAMAP OFFSET 31 LENGTH 4 DATATYPE P USE AS DECIMAL(7 , 2), JOBID SOURCE DEFINITION DATAMAP OFFSET 35 LENGTH 4 DATATYPE D USE AS REAL, EMPID SOURCE DEFINITION DATAMAP OFFSET 39 LENGTH 4 DATATYPE UF USE AS INTEGER, DEPTID SOURCE DEFINITION DATAMAP OFFSET 43 LENGTH 2 DATATYPE UH USE AS SMALLINT, DEPARTMENT SOURCE DEFINITION DATAMAP OFFSET 47 LENGTH 15 DATATYPE C USE AS CHAR(15));
- Connect the Classic Data Architect to your z/OS® system. This comprises the following steps:
- Based on the table you created in CDC with the help of the Classic Data Architect, Data Gate for watsonx creates a schema and a table. An error is
displayed if:
- The table exists.
- The schema does not exist in the catalog that is associated with the target bucket.
Important:- VSAM or IMS-based source tables names are in uppercase, but the automatically created Iceberg schemas and tables are in lowercase.
- The first column of the target table includes a
timestamp timestamp not nullcolumn for internal use. - Refer to the following table to understand the automatic mapping.
- Do not insert blanks in the automatically generated schema, table, or column names.
- The following information pertains to the synchronization of entry-sequenced datasets (ESDS) in
a VSAM source:
For a successful synchronization, the rows of an ESDS need a unique key. If you do not define such a key (replication key), the key is made up of all the column values of a row. This means that the likelihood of duplicate keys increases. If duplicate keys exist, only the last row with that key is synchronized with the target.
It is crucial that a predefined key exists or that such a key can be derived from the column values of a row. If such a key cannot be identified, and rows with identical column values are found, the rows are synchronized only if they occur within different units of work. If they occur within the same unit of work, some of the duplicate rows might not be synchronized.
To identify the resulting target data type, see the following table:
Source type in Classic Data Architect Target type BINARYVARBINARYCHAR(N)VARCHAR, VARCHAR(N)DECIMALDECIMALDECIMAL(P,S)DECIMAL(P,S)DOUBLEPRECISIONDOUBLEPRECISIONFLOATDOUBLEGRAPHICVARCHARINTEGERINTEGERLONG VARCHARVARCHARLONG VARGRAPHICVARCHARREALREALSMALLINTINTEGERVARBINARYVARBINARYVARCHARVARCHARVARGRAPHICVARCHAR