isCOBOL Database Bridge : Working with multiple connections
Working with multiple connections
By default, Database Bridge works on the connection identified by the iscobol.jdbc.driver and iscobol.jdbc.url configuration properties, however it’s possible to define multiple connections and associate the COBOL files with them.
In order to define multiple connections in the isCOBOL configuration, the following syntax must be used:
iscobol.jdbc.driver.<connection_name>
iscobol.jdbc.url.<connection_name>
The above syntax must be repeated for each connection you wish to define varying connection_name. Different connections can be
on the same database
on different databases of the same family (e.g. Oracle)
on different databases of different families (e.g. Oracle and MySQL)
Once there are some connections defined in the configuration, you can associate single files with them with the following syntax:
iscobol.easydb.connection_name.<physical_file_name>=<connection_name>
Files that are not explicitly associated with a connection will use the default connection identified by the iscobol.jdbc.driver and iscobol.jdbc.url settings.
Example:
iscobol.jdbc.driver=com.mysql.jdbc.Driver
iscobol.jdbc.url=jdbc.mysql://localhost:3306/msqldb?user=scott&password=tiger
 
iscobol.jdbc.driver.conn_ora=oracle.jdbc.OracleDriver
iscobol.jdbc.url.conn_ora=jdbc:oracle:thin:scott/tiger@localhost:1521:orcl
 
iscobol.jdbc.driver.conn_post=org.postgresql.Driver
iscobol.jdbc.url.conn_post=jdbc:postgresql:pgdb:scott/tiger@localhost:1522:
 
iscobol.easydb.connection_name.file1=conn_post
iscobol.easydb.connection_name.file2=conn_ora
Using the above settings, FILE1 will work on postgreSQL, FILE2 will work on Oracle, while each other file will work on MySQL.