Next year, we will be performing an upgrade to CA IDMS release 18.5 for Vivium, the insurance company I work for. THE thing I’m looking forward to is to finally have JDBC capabilities available for our IDMS environment – we never had a license for the SQL Option and IDMS Server… It is a bit late maybe, especially since alternatives for the relational model are emerging in the form of NoSQL databases, but nevertheless I intend to make use of this feature to offer an alternative to importing and updating schemas from their syntax…
Adding new import/update capabilities to the Eclipse CA IDMS™/DB Schema Diagram Editor is fairly straightforward : its main plug-in (‘org.lh.dmlj.schema.editor’) defines an extension point called ‘import’ for this purpose. When you write an Eclipse plug-in, you usually extend Eclipse by defining 1 or more extensions; defining an extension point in your plug-in allows others to extend your plug-in (by defining extensions for that extension point). The ‘import’ extension point allows you to define 1 or more import tools – import tools provide the diagram editor with the data it needs to create (or update) a schema diagram.
When you install the diagram editor, you have 1 import tool available out of the box : ‘org.lh.dmlj.schema.editor.importTool1’ (‘Import or update a CA IDMS/DB schema from a file that contains CA IDMS/DB schema syntax.’). When you launch the CA IDMS/DB Schema Import Wizard, you don’t need to select an import tool (in fact you can’t), since there is only one available. When additional import tools are defined, you will have to select one though :
After selecting an import tool, pressing the Select button will lock it; this is necessary because each import tool defines its own set of wizard pages and it’s easier to implement a wizard if you don’t need to remove and add pages (the wizard page flow can become complicated); you can always cancel and restart the wizard if you want to use a different import tool.
Besides the standard import tool, the above example lists an import tool I wrote about 2 years ago and that allows me to import or update a CA IDMS/DB schema directly from a DDLDML area whose (single) file is available on the file system; this import tool is built on my own navigational API library for Java and in which IDMS is not involved (you could say that I built a small part of the IDMS DBMS in Java).
The illustration below gives an impression of the extension point definitions for both import tools (the standard import tool is on the left) :
I will not be going into too much details here but the things to note are :
- Each import tool has to provide a Java class that implements the ISchemaImportTool interface; it is this class that will supply all data regarding the schema.
- There is 1 options page, which is preceded by at least 1 data entry page and followed by zero or more data entry pages.
- You’ll need at least 1 data entry page to allow the user to select the schema to be imported or updated (hence the ‘at least 1 data entry page’ to preceed the options page)
- The options page allows you to fine-tune the import/update operation (e.g. for IDMSNTWK)
- Besides defining import tools, you can define your own layout managers; layout mangers determine the initial placement of records in the diagram (not applicable for update operations).
Now, back to the SQL Web Connect feature…
The idea is to define a new import tool, provide it with at least 1 data entry page that allow(s) you to select an IDMS environment, dictionary and schema, and have the associated class access the dictionary via JDBC calls. I will most probably add a preference page as well, which will allow you to define IDMS environments and dictionaries.
The good news is that it will make the diagram editor interact directly with IDMS for the first time; the bad news is that you’ll have to wait until next year (and of course you should have either the CA IDMS SQL Option and CA IDMS Server or the SQL Web Connect feature available), but now that you have a little background on defining import tools, you can always write this (or any other) import tool yourself 🙂
To be continued…