After you have scanned the existing catalog and have edited the configuration files as appropriate (see Scanning an Existing Catalog), you are in a position to create the deployable files for the new database-hosted catalog. This part of the process will create a new catalog file and a response file that can be used to deploy the data files from disk to database.
You can run the mfdbcatc utility to process all configuration file types (generated in the previous stage - see Scanning an Existing Catalog) at once, or process each configuration file individually.
To perform the process for all configuration files, specify the following command:
mfdbcatc -u -c <catalog file> -fs <CATALOGFOLDER source> -fd <CATALOGFOLDER destination> -h <host> -d <datastore> -n <instance> -v
When the update process is performed, <CATALOGFOLDER source> replaces the <CATALOGFOLDER> placeholders specified in the configuration files. The <CATALOGFOLDER source> is expected to be a disk-based location. The <CATALOGFOLDER destination> location is slightly more complex in the way it's defined - if you specify the -h, -d, and -n options, the destination is built from those entries.
Using the following example, those options resolve to a destination of sql://MYHOST/MYINST/MYSTORE/?type=folder;folder=DATA:
mfdbcatc -u -c CATALOG.DAT -fs C:\DATA\ -fd DATA -h MYHOST -n MYINST -d MYSTORE -v
Alternatively, you could specify the new destination as a complete string (omitting the -h, -n, and -d options):
mfdbcatc -u -c CATALOG.DAT -fs C:\DATA\ -fd sql://MYHOST/MYINST/MYSTORE/?type=folder;folder=DATA/ -v
The result of running either of these commands is a new file called NEWCATALOG.DAT, which takes files located in C:\DATA\ that belonged to CATALOG.DAT, and attributes them to the new destination of sql://MYHOST/MYSTORE/?type=folder;folder=DATA. The original CATALOG.DAT is left untouched. The process also produces a response file called deployfile - see Deploying the files for details.
To run the process individually, once per configuration file, you need to specify the -i[cfg-type] parameter. The following example runs the process for just the files identified by relative.cfg:
mfdbcatc -u -c CATALOG.DAT -fs C:\DATA\ -fd DATA -h MYHOST -n MYINST -d MYSTORE -v -ir relative.cfg
When you have finished recreating the new catalog file (NEWCATALOG.DAT, rename it to CATALOG.DAT) and the deployfile, you must now use the dbfhdeploy utility to deploy the files to the database.
The deployfile file can simply be run using:
dbfhdeploy @deployfile
which will deploy the cataloged data files to the destination configured above.
The deployfile does not deploy the new CATALOG.DAT and its associated SPL* files, and so you must deploy these files manually - you need to be specific about the location in which they are deployed as the catalog likely contains relative references. The deploy command for the catalog file, using the above settings as an example, would look something like:
dbfhdeploy data add NEWCATALOG.dat sql://MYHOST/MYINST/MYSTORE/CATALOG.DAT