Defining multiple Synergy Method Catalogs

By default, the Method Definition Utility and xfServerPlus read the SMC files from the DBLDIR directory. However, there may be times when you want to use an alternate SMC. For example, you could create additional SMCs to allow users to work with their own versions of data during testing or training. Or, you may want to have a development SMC and a production (deployment) SMC. Note that at runtime, each instance of xfServerPlus can reference only a single SMC.

To define an alternate SMC, or to use an SMC that is not in the default location, you need to do the following:

Creating new SMC files

The SMC consists of the data files cdt.is? and cmpdt.is?. Because you cannot change these filenames, additional SMCs must be created in separate directories. You can do this either by creating new files or by copying existing files.

To create new files from within the MDU application

This procedure creates new SMC files in a new location. The new SMC will include the default methods (XFPL_REGCLEANUP, XFPL_LOG, and the methods for the test programs), which are imported from DBLDIR:defaultsmc.xml. If this file is not in DBLDIR, you’ll see a message and the new SMC files will be empty.

1. Create a directory for the SMC files.
2. Start the MDU.
3. Go to Main > Catalog Location and type the new directory path in the Catalog Location field or select Functions > Browse to select a directory. (On Windows, you can also click the drilldown button to browse for a directory.) Select OK or press F3.
4. Select Yes at the prompt to create new files in the specified location.

To create new files by importing an XML file

From the command line, you can create a new catalog and import method definitions from an XML file into it in one step using the -i option.

The newly created catalog will include all methods in the XML file. If the default methods such as XFPL_REGCLEANUP are not in the XML file, you can import them from defaultsmc.xml after the new catalog is created. (See Importing and exporting methods.)

Note

You can also create a new catalog by running MDU with the -u option. However, because -u imports only methods in named interfaces, if there are methods in the XML file that are not assigned to an interface (e.g., XFPL_REGCLEANUP), they will not be imported.

These instructions assume that you already have an XML file, created either by exporting from the MDU (see To export methods from the MDU) or by running dbl2xml (see Using attributes to define Synergy methods).

1. Create a directory for the SMC files.
2. Run the MDU from command line with the -i and -l options. Specify the location of the directory you created for the SMC files, the path and filename of the XML file to import from, and the path and filename for the log file. For example:
dbr DBLDIR:mdu c:\work\NewSMC -i c:\temp\catalog.xml   -l c:\temp\myLog.txt

This command will run without the MDU displaying on the screen. See Using the MDU to define Synergy methods for details on the command line syntax.

To copy existing files

When you copy files, all the data in the current SMC is copied to the new one. You can then delete some of the methods, if desired, or delete all the methods by clearing the copied files with isload. (See isload for instructions.)

1. Create a directory for the SMC files.
2. Copy the existing files from DBLDIR to the new directory. The files are named cdt.is? and cmpdt.is?.
3. If desired, open the MDU in the new location and delete some of the methods.

Specifying which SMC to update

If you have more than one SMC, or an SMC that is not in the default location, you need to specify which SMC to update when running the MDU. There are two ways to do this:

If you don’t specify the SMC location on the command line or with XFPL_SMCPATH, the MDU will load the files from DBLDIR. If necessary, you can then change the files being read by selecting Main > Catalog Location. See Setting the catalog location.

Note

To verify the location of the SMC you’re updating, in the MDU select Main > Catalog Location.