We are working on z/OS using the ACEAPI. In order to address the SQL Gateway, a connection must be established using the CONNECT statement (ACEAPI function SAGQCONN()).
As described in the documentation [“Adabas SQL Gateway Embedded SQL”] the CONNECT statement has a set of parameters (server, user etc.). On our side, these parameters are located in environment specific config files, which are processed during runtime.
- to provide and maintain the connection parameters in a handy way, and
- to implement a processing logic to read the config file and to pass the values to the SAGQCONN() function.
Based on the above, we designed a xsd to provide the required connect data via a xml document.
A config xml looks like this:
[size=9]<?xml version="1.0" encoding="UTF-8"?> <ACE_CONNECTION CDD="mycdd" USER="me" PASSWORD="mypwd"> <PRIMARY_SERVER> <SERVICE ENDPOINT="123.456.123.90:7500"/> </PRIMARY_SERVER> <SUBSIDIARY_SERVER_LIST POLICY="DISTRIBUTE"> <SERVICE ENDPOINT="INTERN.JDBC.WINTER:4711"/> <SERVICE ENDPOINT="INTERN.JDBC.SOMMER:1860"/> </SUBSIDIARY_SERVER_LIST> <CONNECTION_PARAMETER VALUE="APPLICATION=ONDEMAND"/> </ACE_CONNECTION>[/size]
We process the config xml using a SAX parser.
The enclosed zip holds a jpeg showing the xsd structure, the xsd and a sample xml. For validation, we used xml-spy.
Maybe this approach is helpful for others.
Community.zip (74.6 KB)