Examples of the dbfhview Command Line Utility

The following command creates a database view called ACCTFIL, using the default structure in my.str, for the ACCTFIL file in the VSAM datastore.

dbfhview -create -struct:my.str -name:ACCTFIL -file:sql://MYSRV/VSAM/ACCTFIL -configfile:C:\dbconfig\mfdbfh.cfg
The following command creates a database view called ACCTFIL, using the second structure (-id:2) in my.str, for the ACCTFIL file in the VSAM datastore. .
dbfhview -create -struct:my.str -id:2 -name:ACCTFIL -file:sql://MYSRV/VSAM/ACCTFIL 
Tip: To show the structure that corresponds to -id:2, use dbfhview -list -struct:my.str.
The following command creates a script file my.sql, that when run, installs a database view called ACCTFIL, using the default structure in my.str, for the ACCTFIL file in the VSAM datastore.
dbfhview -create -struct:my.str -name:ACCTFIL -file:sql://MYSRV/VSAM/ACCTFIL 
-outfile:my.sql 
Tip: You can edit the script file before it is installed; for example, you may need to reduce the number of columns used in the view in order to fall below the limits allowed by the database type.

The following command deletes the ACCTFIL view that is associated with the ACCTFIL file in the VSAM datastore.

dbfhview -delete -name:ACCTFIL -file:sql://MYSRV/VSAM/ACCTFIL 

The following command lists the structures that are defined in the my.str structure file. The index numbers displayed are used with the -id option when creating a view using a specific structure.

dbfhview -list -struct:my.str

The following command lists the installed views associated with the ACCTFIL file in the VSAM datastore.

dbfhview -list -file:sql://MYSRV/VSAM/ACCTFIL