skip to main content

Remote objects

Remote objects
The isCOBOL Application Server can also work as a repository for backend programs that can be called from client machines. Programs running in stand-alone as well as program running on a client pc in Thin Client environment can call programs that reside on a server computer where an isCOBOL Application Server is running. This objective is achieved through a simple CALL Statement. The remote objects will be searched among the paths listed in iscobol.remote.code_prefix property, which is processed before the standard iscobol.code_prefix.
Programs loaded from remote.code_prefix will be executed server-side using server resources. These programs can communicate with the calling program through LINKAGE SECTION items. They cannot have a user interface, they cannot display anything and must not accept for user input. Only backend programs can run correctly as remote objects.
COBOL programs as well as C functions can be called remotely.
A program called in thread is never searched among remote objects.
Example.
Consider the following setting:
 
And the following statement:
 
isCOBOL will try to load PROG1 from the local CLASSPATH and code_prefix first. If the program is not found, then isCOBOL will try to load PROG1 through an Application Server running on the ip 192.168.0.1 on port 5714. The program will be searched remotely in all the paths listed in the CLASSPATH of the remote machine (ip 192.168.0.1). If the program is still not found, then a "ClassNotFound" error is returned.
Any Exception thrown on the server is returned to the client, including the internal StopRunException, so that a client program can be interrupted when there is a STOP RUN statement or an exception (e.g. wrong linkage section) in the server program: in the former case the program will stop silently without showing any message.
If the remote programs are compiled with the -cp option, then this different syntax must be used to set the iscobol.remote.code_prefix:
Using Aliases
Remote calls can be done through aliases. An alias is a logical name used client side to identify a specific program run with a specific configuration file.
In order to activate such feature for remote calls, the following property must be set in the server side configuration:
Aliases are defined in the server side configuration with properties in the format:
For example, the following server configuration file defines two aliases
On the client side the program calls the alias name instead of the program name. For example, if you want to run the TEST program remotely using the remote configuration file /usr/test/config1.properties, you will just do:
User Authentication
If iscobol.as.authentication * is set to 2 in the server configuration, iscobol.user.name and iscobol.user.passwd must be set client side in order to specify login information.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left