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:
- Create the SMC files in a different location.
- Specify the location of the files when you run the MDU.
- Set the XFPL_SMCPATH environment variable on your server machine so that xfServerPlus can find the SMC files.
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.)
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:
- Specify the SMC location on the command line when you start the MDU. See Method Definition Utility for information on starting the MDU from the command line.
- Set XFPL_SMCPATH in the environment to point to the location of the SMC files. For instructions on setting environment variables on your operating system, see Setting environment variables and initialization settings. Note that if you have set XFPL_SMCPATH in the Windows registry, the synrc file (Unix), or the SERVER_INIT.COM file (OpenVMS), the MDU will ignore it; only xfServerPlus reads XFPL_SMCPATH from those locations (see Setting the XFPL_SMCPATH environment variable for xfServerPlus).
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.
To verify the location of the SMC you’re updating, in the MDU select Main > Catalog Location. |