Many existing COBOL applications use traditional COBOL data files, such as flat files, VSAM, indexed or sequential files, etc., to store critical business information. In their day, this type of data storage did the job; however, with the introduction of relational databases (RDBMSs), the shortcomings of using traditional data storage have come to the forefront. Storing data in a relational database makes it much easier to customize reports and obtain analytics. Data in an RDBMS is typically easier to maintain, meaning less down time. In addition, using an RDBMS or data storage is an important step in building scalable application architectures.
Once you have determined that adding a relational database into your application architecture is what you want, your next step is to consider your deployment options and select one that can best help you to achieve this goal.
Visual COBOL provides several solutions that enable you to update a COBOL application to use a relational database:
OpenESQL provides the greatest flexibility for RDBMS support from within COBOL applications and is a widely used feature. However, for existing applications that are currently file based, updating a typical COBOL application to use OpenESQL is likely to represent a significant effort — potentially many person-years. In this scenario, Micro Focus provides alternative approaches you can use to achieve the benefits of a relational database in shorter time frames.
For optimal performance, MFDBH stores COBOL records as a binary BLOB in the RDBMS. To help you with your reporting and analytic needs, you can optionally create a database view to view the data within the BLOB.
See Micro Focus Native Database File Handling for details.While the DBC approach does provide more flexibility in how data is mapped into a table, it is less optimal with regard to performance. MFDBFH offers the most optimal performance; however, a precise comparison on performance between these two approaches it is not practical as each COBOL application is unique and mileage will vary.
The following provides guidance on how to choose the best deployment option for your COBOL application:
Performance is often the biggest concern when migrating data from files to an RDBMS, and you need to get an idea of the affect it could have on your application. As each application is different, precise comparisons of performance are not practical. That said, we recommend that you use these guidelines to help you make a decision:
MFDBFH | DBC | |
---|---|---|
Supported Databases |
|
|
License model | Core or concurrent user metrics. Development tools included as standard within development products, but separate license required to run application. | |
Technical approach | BLOB-based storage with separate key columns. Views can be added to provide field-level visibility. | Field-based approach with individual columns corresponding to fields within the record. |
Performance | Typically provides higher performance range. | Offers greater flexibility on field mapping. |
Editing support | Views are read only. | Fields can be edited with caution. |
Cloud | Tested with Cloud service provider databases such as AWS RDS and Azure PostgreSQL. | Offers generic database access using ODBC for on-premise scenarios. |
Connection can be shared with an existing RDBMS connection | Yes for XA connections, but no for all others. By default, MFDBFH local connections maintain their own cache. However, Oracle can be optionally configured to use either an OCI connection or session pooling. | No for all connections. |
Data file editor support | Yes, in version 8.0 and later | No |
Supported by Enterprise Server and PACs | Yes | No |
Arrays, ODOs, and redefines behavior | Applies only when a view has been generated. ODOs are not supported in Views. | Creates a separate column for each array element. |
JVM | Yes, in version 10.0 and later | Yes, but incorporates native code and is therefore not a pure managed-code solution. |