The dbfhview Command Line Utility

Use the dbfhview command line utility to maintain a list of database views that you can use to view your datastore files once they have been uploaded to the database.

Syntax:

dbfhview [action][options]

Or:

dbfhview @<response-file-name> [-verbose]
action
Can be one of the following:
  • -create - creates a new view or view definition.
  • -delete - deletes a view associated with a file.
  • -list - lists the structures available in a structure file, or the views associated with a file.
options
Specify one or more of the following:
-configfile:<name>
Specifies 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. Use with the -create, -delete, and -list actions.
-file:<url>
Specifies the file URL for which the view is to be created. Use with the -create, -delete, and -list actions.
-id:<struct-id>
The structure ID with which to create the view. Use the -list -struct action/option to obtain the possible IDs. If this option is not specified, the default structure, as denoted by * when listed, is used for the view. Use with the -create action.
-name:<name>
Specifies the name of the view. Use with the -create and -delete actions.
-nobanner
Suppresses output to a minimum.
-outfile:<name>
Specifies the name of a file in which to output the SQL script that creates the view. Use with the -create action.
Use this option instead of installing the view directly into the database. With this option, you can edit the script before you install the view.
-struct:<name>
Specifies the name of the structure file, generated by the Data File Editor, that contains the structures from which the view will be created. Use with the -create and -list actions.
@<response-file-name>
Multiple actions, 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 creates three views (STAFFALL, STAFFMAN, and STAFFTEMP) for the same datastore file (ACCTFIL). It takes the structure details for the 3 structures from the same structure file (my.str):
-create -struct:my.str -name:STAFFALL -file:sql://MYSRV/VSAM/ACCTFIL
-create -struct:my.str -id:2 -name:STAFFMAN-file:sql://MYSRV/VSAM/ACCTFIL
-create -struct:my.str -id:3 -name:STAFFTEMP -file:sql://MYSRV/VSAM/ACCTFIL

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

dbfview @commands.txt
-verbose
Displays additional information as the command is run. Use with the -create -delete, and -list actions.