User Written Libraries

User-written libraries allow DBEnterprise to perform many of the reformatting and transform functions that previously required ALGOL procedures running on the MCP Server. The ALTER and TRANSFORM declarations in DBGenFormat require these procedures.

Typically, if the ALTER and TRANSFORM declarations do not require access to a database or file on the MCP Server, then DBEnterprise can call a user-written dynamic link library (dll) to accomplish the same reformatting and reduce the MCP Server resource utilization.

DBEnterprise can also call user-written libraries to provide FileXtract functionality, which also reduce MCP Server resource utilization. The Samples\LINCLOG subfolder contains all of the source code and project settings for building a FileXtract LINCLOG Reader dll. When such a dll is available to DBEnterprise, the MCP Server will not use the equivalent ALGOL-based LINCLOG Reader.

LINCLOG Source Support Library

DBEnterprise 6.1 and later includes the LINCLOG Source Support Library (LINCLOG.dll). This library illustrates how to write your own libraries and can be used to process LINCLOGs directly in DBEnterprise.

The Enterprise\Support subfolder in the program folder contains C++ header files and a code library (DBEUser.lib) that provide useful DBEnterprise functions. You can use these functions to simplify writing a library for reformatting, transforming, and FileXtract functionality. The DataItem.h and DataItem.cpp files in Samples\LINCLOG provide useful routines for accessing and updating individual data items.

After you build the library, copy it as <sourcename>(<updatelevel>).dll to the subdirectory containing DBEnterprise.exe. You can also copy it as <sourcename>.dll if you don’t want to keep separate versions for each update level.

When DBEnterprise first links to a user-written library it calls an initialization function in the library. If the initialization function returns an error code signifying the library needs to be recompiled, DBEnterprise will automatically recompile it using the MakeUserLib.cmd batch file in the DBEnterprise program folder. This mechanism mirrors the DATABridge Host capability and ensures that the user library will always be current. See the batch file for additional information and customization directions.

Sample reformatting and/or transforming libraries are available upon request.