Introduction to gmNI
Though most of the operations needed by the translation tools, as executed via their internal runtime code, are sufficient to support migration projects, it is sometimes necessary to code at the C level. The facilities used to do this are called "gmNI" (pronounced "GeMiNI" and meaning the "Great Migrations Native Interface"). The term "Native Interface" is borrowed from
Java. As described in Wikipedia, "The Java Native Interface (JNI) is a programming framework that enables Java code running in a Java Virtual Machine (JVM) to call and to be called by native applications (programs specific to a hardware and operating system platform) and libraries written in other languages such as C, C++ and assembly". The gmNI is a programming framework that enables Great Migrations translation tools to call and be called by native dynamic-link-libraries written in C.
The gmNI enables one to write native methods to handle situations when a migration cannot be written entirely in
gmSL (Great Migrations Scripting Language), e.g., when the standard capabilities of the translation tool do not support some operation needed by the compiler, analyser, author, or auditor.
Code to be made available to a translation tool is linked into a dynamic-link-library that is executed by the tool when certain events occur. As part of that execution the library is passed a set of handles to the methods available within the translation tool.