DBFH deployment: why a datastore URL must describe the file, not just the database
Learn how DBFH datastore URLs carry file layout metadata, how dbfhdeploy uploads and verifies existing COBOL files, and why transactional files require separate XA configuration. [1] [2] [3] [4]
Read the full briefing
Scope: Rocket Enterprise Developer 12.0 for Eclipse (UNIX), covering Database File Handler (DBFH) datastore administration for Enterprise Server applications. The documented UNIX DBFH platform support is x86-64 Red Hat Linux 9 or SUSE 15 SP7.
A useful DBFH distinction is that a datastore URL is more than a database connection string. It identifies a logical datastore, an individual file or folder, and—when necessary—the file's record characteristics. That allows Rocket's deployment utility to move existing COBOL data files into database-hosted storage while retaining information needed to interpret their records. The utility supports KSDS, RRDS, ESDS, line-sequential, and fixed- or variable-length sequential files. Datastore Management
The file URL has the documented structure:
sql://<server-name>/<datastore-name>/<file-name>[?<file-attributes>]The server name refers to an entry in the DBFH configuration file, not necessarily a literal database host name. Optional attributes include folder, type, reclen, and recterm. The type and reclen attributes are needed when deploying applicable files without file headers. recterm addresses record-terminator differences, primarily for RRDS files created on another platform. The default folder is the datastore root. The Datastore URL
For PostgreSQL, Rocket's documented deployment workflow begins in an Enterprise Developer command environment. Set MFDBFH_CONFIG to the database configuration file, or supply -configfile:<name> to the utility. The command environment also supplies MFDBFH_SCRIPT_DIR, which locates the datastore stored procedures. Then add the existing file and list the destination to verify its presence. Upload Files to a PostgreSQL Datastore
Rocket provides this concrete example for a sequential file with 80-byte records:
dbfhdeploy data add file.dat sql://svr-mydb/NEWDEMO/mydat?folder=/USRA;type=seq;reclen=80,80It deploys file.dat as mydat in the USRA folder of the NEWDEMO datastore. On Linux, escape both semicolons with backslashes when entering this command in the shell. The utility also supports listing, extracting, deleting, and inspecting indexed-file keys. Its -configfile option overrides MFDBFH_CONFIG, which matters when administering more than one configured environment. The dbfhdeploy Command Line Utility
The critical boundary is transactional use. Uploading a file does not complete transactional Enterprise Server configuration: if any deployed files are transactional, Rocket requires an XA resource in the region pointing to the datastore. If none are transactional, that XA step may be skipped. The subsequent CICS or JCL file-access configuration is still a separate task. Upload Files to a PostgreSQL Datastore
Takeaway: Treat DBFH deployment as three checks: correct datastore URL and record attributes, successful upload and listing, and XA configuration whenever the hosted files are transactional. Upload Files to a PostgreSQL Datastore