The Driver Class

To run ABL2DB one runs launcher_abl2db.p whose configuration is discussed in the Configuration section. it sets up the overall log (one can add additional tracking if desired for debugging), creates the Driver class, initializes the Driver class with the configuration values, and then executes the Initialize() method which tests some preconditions, and the Process() method which does the actual work.

The Driver class Process() method simply calls each of the classes which make up the ABL2DB processing in a logical order, one at a time. This process is easily customized to either skip some steps or to alter what happens in a particular step.

In particular, ABL2DB has been designed to start with an "empirical" compile of the code under the source directory that matches the specified criteria for a compilable unit of source code. This was done to ensure:

  • All compilations are current; and
  • All r-code, xref, list, and debug files are present for all compilable files;

In ABL2DB, the decision was made to determine whether a file is or is not a compile unit based on whether an r-code file exists for it. Thus, compile-on-the-fly source code units are not considered compile units because, not being compilable except in a run-time context, one cannot generate the xref and list files for it.

If a particular application context can ensure that all files will be present and current, one could easily skip this step, but it was included to be safer than assuming that this processing occurred previously.

Similarly, if a particular usage of ABL2DB did not require some component of the information which it collects, one could easily skip that step as long as it was logically possible.

At present, it is assumed that a full build from scratch is done every time this process is executed. Providing a suitable empty database is external to this code.