Open topic with navigation
WTSupported in traditional Synergy on Windows
USupported on UNIX
VSupported on OpenVMS
The dbl2xml utility processes Synergy DBL source files that include language attributes, parameter modifiers, and comments, and outputs an XML file containing interfaces and methods. This XML file is then used to update the Synergy Method Catalog (SMC), via the Method Definition Utility’s import facility, for use with xfServerPlus and xfNetLink.
Many users find updating the SMC manually by entering data in the Method Definition Utility (MDU) to be not only tedious, but also subject to error because changes to source code oftentimes require a change to the SMC definition as well. By attributing your code and running dbl2xml, you can automate the process and achieve greater accuracy. See Using attributes to define Synergy methods for details on attributing your code.
The dbl2xml utility has the following syntax:
dbl2xml [options] sourcefile [...]
(optional) One or more of the following. The equal sign is optional; you can use a space instead.
Specify the path and filename for the XML output file. You can use a logical or the full path. The extension .xml will be appended to the filename if no extension is specified. By default, the file is named with the first interface encountered during processing and placed in the current directory.
Set compile-time defines, where identifier is the name of the identifier being defined and value is the replacement text.
Change the behavior of the END statement to clear .DEFINEs at the end of the routine instead of at the end of the file.
Define an internal compiler variable that can be retrieved with ^VARIANT.
Process multiple source files (for example, -single *.dbl or -single a.dbl b.dbl c.dbl) individually instead of as a compilation unit.
Display dbl2xml command line options and usage information.
The name of one or more source files to be processed. The default filename extension is .dbl, and wildcard characters are valid.
You can alternatively specify a redirected input file in the format < file, where file contains a list of files to process. Wildcard characters are not valid with this format. For Windows and UNIX, -T is valid (as described in Redirecting compiler commands from a file on Windows and UNIX). Within the input file, continuation lines are determined by a trailing minus sign (-) on the previous line. If the input file contains multiple lines without the use of continuation characters, dbl2xml treats each line separately, and multiple XML files will be produced.
The dbl2xml utility creates a single XML file from one or more source files. Before running this utility you must attribute your code as described in Using attributes to define Synergy methods.
If the routines included in a single interface are located in more than one source file, you should process all those source files at the same time. This will make it easier to update the SMC, as you can then import the entire interface at once, replacing the existing interface (if there is one). See Importing and exporting methods for instructions.
The -single option causes files to be processed one at a time rather than together in a compilation unit. We suggest that you use -single if you have a lot of .dbl files with no interdependencies and you do not want to consume a large amount of memory or processing time.
In addition to errors generated by dbl2xml, you may see compiler errors because dbl2xml runs the compiler before creating the XML file. We recommend that you compile and fix any errors before running dbl2xml.
When you change your source code, you should run dbl2xml to regenerate the XML file and then re-import it into the SMC. You may want to add the commands to run dbl2xml and to import the XML file to your build script.
The first example processes two source files and creates an XML file named fred.xml. The second example uses the -single option and a wildcard character to process all .dbl files in the current directory and creates an XML file named fred.xml:
dbl2xml -out=c:\work\fred myfile1.dbl myfile2.dbl dbl2xml -out=c:\work\fred -single *.dbl