Skip to Content

How to access files on a different server

Estimated Reading Time: 1 Minutes

Question:

Can we run a program in server 1 and update the data to database sitting on server 2?

Answer:

Yes!
If you are accessing an RDBM you can use the iscobol.jdbc.url property to point to the data server.
For instance, your url to connect to a SQL Server database on server 2 might look like this:

   iscobol.jdbc.url=
   jdbc:sqlserver://server2-ip-address:1433;user=sa;password=sa;encrypt=false;DatabaseName=master
If you are using indexed, sequential or relative files you can use the isCOBOL File Server to access your data files on server 2 from your programs on server 1.
Here are the steps:
  • Start the File Server on server 2.
    Your command might look like this:
       iscserver -fs -hostname server2-ip-address
    
  • Set the iscobol.file.prefix property using remote isf protocol.
    The setting might look like this:
    iscobol.file.prefix=isf://server-ip-address:/path/to/data
    
There are many additional options and settings for running the file server and using remote isf protocol.
Please check the documentation for the isCOBOL File Server in the isCOBOL Application Server documentation.

How to access files on a different server