Examples of the dbfhconfig Command Line Utility

Note: On UNIX platforms, the command is dbfhconfig32 or dbfhconfig64, depending on your working mode.
Note: For all the following examples, if the name of the configuration file is not specified, the action is performed upon the file specified by the MFDBFH_CONFIG environment variable. If that variable is not set, a file name of MFDBFH.cfg, in the current directory is assumed.

The following command creates a database server instance element for an MSSQL server instance named MYSRV. It creates in the configuration file named MFDBFH.cfg, in the current directory; if the file is not found, a new one is created. It also inserts a comment just prior to the inserted element.

dbfhconfig -add -server:MYSRV -provider:ss -comment:"Local MSSQL Server"

The following command inserts a <dsn> element named SS.VSAM, for the MYSRV instance; the datastore is named VSAM.

dbfhconfig -add -server:MYSRV -dsn:SS.VSAM -type:datastore -name:VSAM

The following command deletes the database server element (and all its child elements) for server MYSRV.

dbfhconfig -delete -server:MYSRV 

The following command deletes the <dsn> element named SS.VSAM that is specified for the MYSRV database instance.

dbfhconfig -delete -server:MYSRV -dsn:SS.VSAM

The following command lists an overview the server instances, and the number of <dsn> elements configured for each.

dbfhconfig -list

The following command lists details of the <dsn> elements configured for the server instance MYSRV.

dbfhconfig -list -server:MYSRV

The following command updates the MYSRV database server element with a comment.

dbfhconfig -update -server:MYSRV -comment:"Dev only server"

The following command updates the existing SS.VSAM <dsn> element with I/O optimizations and a comment.

dbfhconfig -update -server:MYSRV -dsn:SS.VSAM -optio:all -comment:"User files" 

The following command enables vault facility use for the database credentials within the configuration file. See Configure a Secrets Vault for the Micro Focus Database File Handler for more information.

dbfhconfig -vault

The following command disables vault facility use for the database credentials within the configuration file.

dbfhconfig -novault