Method Definition Utility

The Method Definition Utility (MDU) is used to add, change, and delete data in the Synergy Method Catalog. It also includes functions for importing and exporting data and for verifying repository structures and enumerations. See Examples.

dbr mdu [smc_path] [-r rps_path] | [-m rps_main -t rps_text] 
[-e XMLfilename] | [-i XMLfilename -l logfile] | [-u XMLfilename 
-l logfile] | [-v -l logfile] [-?]

smc_path

(optional) Specify the directory where the SMC files are located. If not passed, the environment variable XFPL_SMCPATH is used (see Specifying which SMC to update). If that is not set, the SMC files in DBLDIR are used. If smc_path is specified, it must be the first argument.

You can use an xfServer file specification if the SMC files are located on a remote machine. See example D.

If you specify an existing directory path, either on the command line or with XFPL_SMCPATH, and there are no SMC files in that location, you will be prompted to create them. If you specify no directory path and there are no files in DBLDIR, you will be prompted to create them in DBLDIR.

You can change the SMC directory from within the MDU. See Setting the catalog location.

-r rps_path

(optional) Specify the directory where the repository files are located. The MDU will look for the files rpsmain.ism and rpstext.ism in this directory. You can use an xfServer file specification if the repository files are located on a remote machine.

If rps_path is not passed, the environment variables RPSMFIL and RPSTFIL are used to determine the two repository filenames. If they are not defined, the repository files in RPSDAT are used.

You cannot change the repository once the MDU is running; you must restart the MDU to specify a different repository. We recommend that you use only one repository per SMC.

Note

The MDU will attempt to open the repository files on start-up. If you explicitly specify the repository path (-r) or main and text filenames (-m and -t) on the command line, and the repository cannot be found or either of the repository files cannot be opened, the MDU will generate an error and terminate. If you don’t use the -r option or the -m and -t options, and the repository cannot be found or opened, the MDU will start anyway and the Repository Location dialog box will display blank.

-m rps_main

(optional) Specify the complete path and filename for the repository main file. Use with -t. If rps_main and rps_text are not passed, the environment variables RPSMFIL and RPSTFIL are used to determine the two repository filenames. If they are not defined, the repository files in RPSDAT are used. You can use an xfServer file specification if the repository files are located on a remote machine. See example E.

-t rps_text

(optional) Specify the complete path and filename for the repository text file. Use with -m. If rps_main and rps_text are not passed, the environment variables RPSMFIL and RPSTFIL are used to determine the two repository filenames. If they are not defined, the repository files in RPSDAT are used. You can use an xfServer file specification if the repository files are located on a remote machine. See example E.

-e XMLfilename

(optional) Export the SMC definitions to the specified file. The file will be created in the current working directory unless you specify the complete path. If the SMC includes structure parameters or enumeration parameters or return values, the repository must be present. This option exports the entire SMC and writes it to an XML file without displaying the MDU user interface. You can use the -e option to incorporate export functionality into a batch file. Cannot be used with -i, -u, or -v. See example G.

-i XMLfilename

(optional) Import all definitions in the specified XML file. Specify the complete path or use a logical if the file is not in the current working directory. This option replaces the entire catalog with the definitions in the specified XML file. (See -u, below, for an update option.)

The MDU user interface does not display, so you can use the -i option to incorporate import functionality into a batch file. Cannot be used with -e, -u. or -v. See example H. Before importing, you should verify that no one else is using the SMC files. If you want to import only selected interfaces or methods from the XML file, use the Import Methods menu option; see Importing and exporting methods.

Important

When using the -i or -u option to update an existing SMC, pay close attention to the SMC you are updating, as these options overwrite data in the target SMC. You may want to make a habit of always specifying the SMC path on the command line when using these options.

-u XMLfilename

(optional) Update an existing catalog with the interface definitions in the specified XML file. Specify the complete path or use a logical if the file is not in the current working directory. This option causes existing interfaces in the SMC to be replaced with the interface of the same name in the XML file. Any new interfaces in the XML file are added to the SMC. See example I.

This option imports only methods in named interfaces; methods that are in an unnamed interface are ignored. (An “unnamed interface” means that in the XML file, the method is nested within an interface tag, but that tag has no name property. In the MDU, such a method would have no interface assigned, as is the case with XFPL_REGCLEANUP and XFPL_LOG.)

The MDU user interface does not display with -u, so you can use this option to incorporate update functionality into a batch file. Cannot be used with -e, -i, or -v. Before updating, you should verify that no one else is using the SMC files.

Tip

You can use the -i or -u option to create a new SMC from definitions in an XML file. See To create new files by importing an XML file.

-v

(optional) Verify and update the repository structure sizes in the SMC. This option compares the structure sizes in the SMC with those in the repository and updates the SMC as necessary without displaying the MDU user interface. Cannot be used with -e, -i, or -u. Also reports enumerations that are present in the SMC but not the repository. See example J. For more information about this function, see Verifying repository structure sizes and enumerations.

-l logfile

(optional) Specify a log file to be used for logging errors during an import or logging changes made during repository verification. Use only with -i, -u, or -v. If -l is not specified, the default log file (import_smc.log or verify_smc.log) will be created in the current working directory on OpenVMS and in the location specified with the TEMP environment variable on Windows and UNIX. (Note that these log files are created only when there are actually errors, warnings, or changes to log.)

-?

(optional) Display a list of options for the utility.

These examples show various ways to start the MDU and run MDU utilities.

A. The example below shows how to start the MDU using the default SMC files and repository files. This command will use the SMC files in the location specified by XFPL_SMCPATH. If XFPL_SMCPATH is not set, mdu will use the files in the location specified by DBLDIR. The logic used to determine the default repository files is explained in the rps_path argument (see -r rps_path ).
dbr DBLDIR:mdu
B. To start the MDU using SMC files in the work\smc directory and the rpsmain.ism and rpstext.ism files in the work\rps directory, use this command line:
dbr DBLDIR:mdu c:\work\smc -r c:\work\rps
C. To start the MDU using SMC files in the work\smc directory and specify the repository files by name, use this command line:
dbr DBLDIR:mdu c:\work\smc -m c:\work\rps\MyMain.ism -t c:\work\rps\MyText.ism
D. The two examples below show how to start the MDU using SMC files on a remote machine that is running xfServer. You can use the full path or a logical with the xfServer file specification. When specifying a path, be sure to use the correct path syntax (delimiters) for the operating system where the files are located—not the path syntax for the local system.
dbr DBLDIR:mdu /usr/SMClocation/@elmo
dbr DBLDIR:mdu XFPL_SMCPATH:@elmo
E. To start the MDU using repository files on a remote machine, use the xfServer file specification:
dbr DBLDIR:mdu XFPL_SMCPATH:@elmo -m RPSMFIL:@elmo -t RPSTFIL:@elmo
F. To start the MDU on OpenVMS, you must define MDU as a foreign command and then execute it. In the example below, the MDU will look for the files rpsmain.ism and rpstext.ism in the DEV:[work] directory.
$ MDU:==$DBLDIR:MDU
$ MDU -R DEV:[work]
G. In this example the contents of the SMC file located in c:\work\smc are exported to a file named CatalogA.xml. We have specified the repository location so that the correct structure and enumeration definitions are exported.
dbr DBLDIR:mdu c:\work\smc -r c:\work\rps -e c:\temp\CatalogA.xml
H. In this example, the definitions in CatalogA.xml are imported into the SMC located in d:\synergy\smc, replacing the entire catalog in that location. If there are any errors, they will be recorded in myImpLog.txt, and the import will be canceled.
dbr DBLDIR:mdu d:\synergy\smc -i c:\temp\CatalogA.xml -l c:\temp\myImpLog.txt 
I. This example updates the definitions in the SMC located in d:\synergy\smc with the definitions in CatalogB.xml; interfaces of the same name will be replaced and new interfaces will be added.
dbr DBLDIR:mdu d:\synergy\smc -u c:\temp\CatalogB.xml -l c:\temp\myImpLog.txt 
J. The example below shows how to run the Verify Catalog utility, specifying the SMC and repository file locations. All changes made, as well as any problems encountered, will be logged to myVLog.txt.
dbr DBLDIR:mdu c:\work\smc -r c:\work\rps -v -l c:\temp\myVLog.txt