The dbfhdeploy Command Line Utility

Use the dbfhdeploy command line utility to deploy files to your datastore databases.

Syntax:

dbfhdeploy [Options][Category] ActionParameters

Or:

dbfhdeploy @<response-file-name> [-verbose]
Options
Refer to the running of the command as a whole:
  • -configfile:<name> - the path and file name of the database configuration file. This is optional if the MFDBFH_CONFIG environment variable is already in effect, but if set, will override the value of the MFDBFH_CONFIG.
  • -opt - turns on file I/O optimization when deploying files. This option is on by default.
  • -noopt - turns off file I/O optimization when deploying files.
  • -nobanner - display minimal output.
  • -urlhelp - display information about the URL syntax.
  • -verbose - displays additional information, such as the database configuration file and script folder locations in effect, and the deployment time for the current operation.
Category
Defines the item to be acted upon. Valid values are:
data
The item to be acted on is a data file.
For an add, delete, or extract action, the URL must be of the form: sql://server-name/datastore/filename[?folder=/path]

For a create or list operation, the URL must be of the form: sql://server-name/datastore[?folder=/path]

See The Datastore URL for full details of the required URL syntax.

ActionParameters
Action to perform and the data store to perform it on. Valid values are:
add path URL;attribs
Add data file specified in path to the datastore specified in URL.
Some file types require additional attributes, which can be:
type=seq|lseq|rrds|blob
The type of file (other than a VSAM file) that is being added.
reclen=min,max
The minimum and maximum length of each record within the file.
recterm=windows|linux|unix
The type of record terminator used in the file. This is used primarily for RRDS files, and is only required for files that have been created on a different platform to the one on which it is currently being deployed.
For example, the following command adds the sequential file file.dat to the USRA folder, in the NEWDEMO datastore in svr-mydb, where it is referred to as mydat and has a (minimum and maximum) record length of 80:
dbfhdeploy data add file.dat sql://svr-mydb/NEWDEMO/mydat?folder=/USRA;type=seq;reclen=80,80
Note: On Linux platforms, you must remember to escape the semicolon with a backslash; for example, ...folder=/USRA\;type=seq\;reclen=80,80.
create URL
Create a datastore in the specified URL.
For example, the following command creates the NEWDEMO datastore in the svr-mydb instance:
dbfhdeploy data create sql://svr-mydb/NEWDEMO -configfile:home/usera/dbconfig/mfdbfh.cfg
Warning: When dealing with Oracle, the physical database you are connecting to must already exist before the datastore can be created.
delete URL
Delete data files from datastore specified in URL.
For example, the following command deletes the mydat data file stored in the USRA folder, in the NEWDEMO datastore:
dbfhdeploy delete sql://svr-mydb/NEWDEMO/mydat?folder=/USRA
You can also delete multiple files/folders using one of the following:
  • The following command delete all files and sub-folders under the MyTests folder:
    dbfhdeploy delete sql://svr-mydb:50000/VSAM?type=folder;folder=/MyTests
  • The following command deletes all files and folders within the VSAM data store:
    dbfhdeploy delete sql://localhost:50000/VSAM?type=folder;folder=/
  • The following command deletes all files within the MyTests folder that start with 'a' or 'A':
    dbfhdeploy delete sql://localhost:50000/VSAM/a*?folder=/MyTests
Tip: Specifying the -verbose option with any of these commands displays the files and folders that are deleted.
extract URL path
Extracts a copy of the data file specified in URL to the path specified by path.
For example, the following command extracts a copy of mydat from the USRA folder of the NEWDEMO datastore, and saves it as my-extract.dat:
dbfhdeploy data extract sql://svr-mydb/NEWDEMO/mydat?folder=/USRA my-extract.dat
keys <key-options>
Perform operations on keys within an indexed file. See Key Options below.
list URL
Lists data files that are located in the specified URL.
For example, the following command lists all the data files and sub-folders stored in the VSAM folder of the ESDEMO datastore:
dbfhdeploy data list sql://svr-mydb/ESDEMO?folder=/VSAM
upgrade URL
Note: Only use this option when instructed to by a representative of OpenText Support for Micro Focus Products.
Upgrades the stored procedures associated with the data file specified in URL.
For example, the following command upgrades any stored procedures associated with the mydat2 data file stored in the USRB folder of the NEWDEMO datastore:
dbfhdeploy upgrade sql://svr-mydb/NEWDEMO/mydat2?folder=/USRB
Key Options:
list
This example lists all the keys (primary and alternate) that are defined for the my.dat file in the ESDEMO datastore:
dbfhdeploy keys list sql://svr-mydb/ESDEMO/my.dat
The result may be something like this, showing two keys - one that allows duplicates, and one that doesn't:
Key  Start  Length  Dupl  Dupl #
---  -----  ------  ----  ------
0    1      3       N     0
1    5      3       Y     0
<key-id>:<key-op>
Perform an operation on a specific key where <key-id> is the key number indicated in the keys list (see list URL action above). <key-op> is one of the following:
  • dup=n|no|false - change key to disallow duplicates. (No duplicate key values must exist before you can change to this setting.)
  • dup=y|yes|true - change key to allow duplicates.
For example: the following command disallows duplicate key values for key #1 in the key list for my.dat.
dbfhdeploy keys 1:dup=no sql://host/datastore/my.dat
@<response-file-name>
Multiple ActionParameters, as listed above, can be added to a text file, one command per line. When that response file is run, each line is executed in turn.
For example, the following contents of a response file adds two files to a datastore, and then extracts one of them to a local directory:
add my.dat sql://MYSRV/FILES/my.dat
add file.dat sql://MYSRV/FILES/file.dat?folder=/MyDir
extract sql://MYSRV/FILES/my.dat c:\MyDir\my.dat

If the file was saved with a name of commands.txt, you would run it using:

dbfhdeploy @commands.txt