CA Plex Model Export or Possible Model API Use to extract DB key and index information to use for building an operational data store.

Document ID : KB000009861
Last Modified Date : 14/02/2018
Show Technical Document Details

I am working with a client that is using v6.1 of Plex and they have a single, huge model file for the  entire enterprise. 

I want to find a way to perhaps through code read information from the model  regarding primary keys, foreign keys and indexes of the DB2 database on the IBMi, so that I can build an operational data store for a data warehouse in SQL Server.


Open up a customer support ticket at Customer Support Online or call 1-866-225-5224 and request a copy of the Model-API sample that generates and builds all of the physical tables in the database. You can use this database to compare with the DB2 schema and extract the keys and indexes.

To run the sample, please do the following: 

(1) Unzip the sample somewhere. 
(2) Launch Visual Studio 2013 as Administrator – this is important otherwise you can’t initialize the COM interface wrapper. 
(3) Open the PlexGenAndBuildSample.sln Solution. 
(4) Launch Plex and load a local model that has tables. 
(5) Clear out the tables from the generation directory for the local model. 
(6) Debug the project and press the Generate button; the tables associated with the local model should be generated into the target output directory.