Created Date: 1/17/2004
Last Updated: 10/19/2010
Description: Example program demonstrating the use of the Synergy XML API to export data from Synergy DBMS files or to import data into Synergy DBMS data files using xfServerPlus.
Platforms: Windows; Unix; OpenVMS
Products: XML API
Minimum Version: 8.1
Author: William Hawkins
Additional Information:
Files required to build
xfspism2xml.dbl subroutines and functions xfspism2xml.def control parameters xfspism2xml.rec data record
xfspism2xmltest.dbl UI Toolkit program
To build this program :
dbl xfspism2xmltest dblink xfspism2xmltest WND:tklib.elb
dbl xfspism2xml dblink -l xfspism2xml.elb xfspism2xml.dbo
Discussion:
If the filename contains a colon, it is assumed to be a physical filename, and the structure name MUST be provided. You cannot specify a filename in the current directory without using a logical
If the filename does not contains a colon, it must contain a Repository filename, and the structure name is optional. If the structure name is provided, all records will use the provided structure. If the structure name is not provided, each record is checked against any Repository tags, and the appropriate structure is used.
XMLtype is an alpha string, as represented in xfspism2xml.def. The "ADO recordset" and "Data Island" are used by Crystal Reports, and were implemented using information available on the CrystalDecisions web site, but neither have been fully tested. If you find any problems with these formats, please email the author.
How to use these routines:
If you want to display progress information:
call xfsp_ism2xml_init(filename, structurename, xmltype,
& key_number, first_key, last_key, type_type)
do
display progress info
status = %xfsp_ism2xml_data(20, numrecs)
until(status == DE_NOMOREDATA)
call xfsp_ism2xml_exit(xml_string)
process xml string
If you do not want to display progress information:
call xfsp_ism2xml_init(filename, structurename, xmltype,
& key_number, first_key, last_key, type_type)
call xfsp_ism2xml_data
call xfsp_ism2xml_exit(xml_string)
process xml string
If you want an XML schema file to match the XML beging generated:
call xfsp_ism2xml_xsd(xsd_string)
between the xfsp_ism2xml_init routine and the xfsp_ism2xml_exit routine
XFPL.INI
XFPL_LOG=ON XFPL_SESS_INFO=NONE XFPL_FUNC_INFO=NONE XFPL_DEBUG=NONE XFPL_LOGICAL:RPSLIB=C:\Program Files\Synergex\SynergyDE\RPS\lib XFPL_LOGICAL:WND=C:\Program Files\Synergex\SynergyDE\Toolkit XFPL_LOGICAL:EXE=C:\Source XFPL_LOGICAL:TMP=C:\Source XFPL_LOGICAL:RPSMFIL=C:\Source\RPS\rpsmain.ism XFPL_LOGICAL:RPSTFIL=C:\Source\RPS\rpstext.ism
Synergy Method Catalog descriptions
The xmlstring parameter is coded as a numeric, but will work if passed as alpha.
Synergy Method Catalog descriptions (alternate)
N.B. first_key and last_key may need to be adjusted to allow for larger keys/records.
Example XML formats
999 Synergex International Corporation 2330 Gold Meadow Way Gold River CA 95670 + 1 (916) 635 7300