Subscribe
THE DAILY DIGEST

The daily edition.

Essential reading from Rocket Enterprise. Straight to the source.

Archived edition
DAILY EDITION1 story· 5 min read

Database File Handler (DBFH) & Relational VSAM Datastores

When rehosting mainframe applications to open systems, managing traditional VSAM files (KSDS, ESDS, RRDS) and sequential datasets on network-attached storage (NFS or SAN) introduces operational challenges—including file system lock contention, latency bottlenecks, and risk of file corruption during abnormal server crashes.

IN FOCUS

Database File Handler (DBFH) & Relational VSAM Datastores

When rehosting mainframe applications to open systems, managing traditional VSAM files (KSDS, ESDS, RRDS) and sequential datasets on network-attached storage (NFS or SAN) introduces operational challenges—including file system lock contention, latency bottlenecks, and risk of file corruption during abnormal server crashes. [1]

Read the full briefing

1. Capability Overview

When rehosting mainframe applications to open systems, managing traditional VSAM files (KSDS, ESDS, RRDS) and sequential datasets on network-attached storage (NFS or SAN) introduces operational challenges—including file system lock contention, latency bottlenecks, and risk of file corruption during abnormal server crashes.

The Rocket Database File Handler (DBFH) solves this by allowing native CICS, IMS, and batch COBOL applications to store their data files, system catalogs, and resource definitions directly inside a Relational Database Management System (RDBMS)—such as PostgreSQL, Microsoft SQL Server/Azure, IBM Db2, or Oracle. Crucially, applications continue using standard COBOL file I/O statements (READ, WRITE, REWRITE, START) without requiring any application source code modifications (Database File Handling and Enterprise Server Region Database ...).

2. Architecture & How It Works

  • Datastores vs. Region Databases: DBFH structures storage into two distinct architectural tiers (Database File Handling and Enterprise Server Region Database ...):
    • Datastores: Host user and application data files (indexed VSAM datasets, sequential files, and JCL batch catalogs). Datasets inside datastores are designated using a uniform resource identifier syntax: sql://<DATASTORE-NAME>/<FOLDER>/<DATASET-NAME> (Configuring the JCL Environment for Database File Handling).
    • Region and Cross-Region Databases (ES_LOCKDB): House internal server state, cross-region communication data, and cluster-wide lock tables. This enables multiple active server instances across a cluster to coordinate record locking without maintaining a legacy Fileshare daemon (Configure a Region or Cross-Region Database in Enterprise Server ...).
  • Relational File View Generation: Because VSAM records are decomposed and stored within relational database tables, DBFH provides a File View Generation capability. By pairing a COBOL record description (copybook) with the datastore table, DBFH generates standard SQL relational views over raw mainframe binary records. This allows external reporting, business intelligence, and analytics tools to query live mainframe data directly via standard SQL queries without executing COBOL batch extracts (Database File Handling and Enterprise Server Region Database ...).
  • ACID Resiliency & Recovery (dbfhadmin): By leveraging the transactional engine of the underlying RDBMS, multi-step file operations gain full ACID isolation. If an Enterprise Server region abnormally aborts while datasets are open, Enterprise Server automatically resolves transactions upon restart. If dangling lock conditions or orphaned file statuses persist, administrators can run the dbfhadmin command-line utility to inspect and reset locked resources without requiring a complete database rollback (Configuring the JCL Environment for Database File Handling).

3. Practical Configuration & Operational Tidbits

  1. Activating DBFH via Environment Variables: In ESCWA (Enterprise Server Common Web Administration) under Operation > Directory Server > [Region] > General > Properties > Environment Variables, configure the following directives (Configure a Region or Cross-Region Database in Enterprise Server ...):
    • ES_DB_FH=Y — Activates the Database File Handler.
    • ES_DB_SERVER=<instance-name> — Names the database instance configured in your ODBC or client profile.
    • MFDBFH_CONFIG=<path>/mfdbfh.cfg — Specifies the configuration file mapping logical datastores to database connection strings.
    • MFDBFH_SCRIPT_DIR=<path> — Identifies the directory holding product SQL scripts and stored procedures.
  2. Cold-Starting for Schema Provisioning: When enabling DBFH for the first time, perform a cold start using the command-line flag casstart /s:c -r<REGION>. The region startup sequence automatically runs the underlying database scripts to verify and instantiate required schema tables (Configure a Region or Cross-Region Database in Enterprise Server ...).
  3. Deploying Datasets with dbfhdeploy: Use the dbfhdeploy utility to configure datastores and migrate existing disk-based VSAM or catalog files into the relational database: This command structures the target tables, uploads existing record indexes, and preserves the logical path referenced by CICS Resource Definition (FCT) entries or JCL DD statements (Configuring the JCL Environment for Database File Handling).
dbfhdeploy data file /var/data/customer.dat sql://PGDATASTORE/CICS/customer.dat
  1. Database Role Permissions: Rocket documentation specifies assigning distinct database roles. While general batch and online execution processes require only DML privileges to read and write rows, the operating system account used to start or restart the Enterprise Server region should be granted both install and upgrade roles to automatically apply schema migrations during product updates (Method 1 - Using DBFH-specific roles).

4. Reference Citations (Rocket Enterprise Server 12.0 Manuals)

Enterprise Server · 12.0 · Linux/UNIX
Documentation references
That’s the briefing.You’ve reached the end of this edition.
More editions

From the archive

View all
Sep 22

Mainframe Subsystem Support (MSS) & JES Batch Emulation

Sep 21

XA Distributed Transaction Coordination & Resource Managers (XAR)

Sep 20

External Security Facility (ESF) & Security Manager Stacks in Rocket Enterprise Server