If desired, you can use the CODE_PREFIX variable to define the location of the object programs being called. In a distributed processing environment, the CODE_PREFIX variable can be defined as follows:

CODE_PREFIX . /usr/prog1 *servername:/usr/prog2

where prog1 and prog2 are the directories containing the ACUCOBOL-GT object code (for example, prog1.acu and prog2.acu). In this example, whenever the client application tries to access a program's object code, it first looks for the code in the current directory ("."), then in the local /usr/prog1 directory, and finally on the remote application server *servername in the directory /usr/prog2.

Because AcuConnect supports Transmission Control Protocol/Internet Protocol (TCP/IP), it can also be used to launch application processes over the Internet. In an Internet environment, the *servername portion of CODE_PREFIX would be the name of the application server on the Internet.

Notice that the remote server name is preceded by the asterisk (*) character. The asterisk indicates that the program is located on the server and must be run on the server as well.

When the client COBOL program executes a CALL, it verifies which directory contains the program (by looking in CODE_PREFIX), and executes the program either on the client or the server.

Note: When you use CODE_PREFIX to specify the location of your called program, the runtime traverses the specified paths to locate the resource. If you use this method, try to place remote notations toward the end of the file. Generally, you achieve better performance by defining a code name alias, because remote machines do not need to be searched using this method.

This architecture allows most existing COBOL programs to operate in a true distributed processing environment without any code modification. You can simply install AcuConnect and modify the client.cfg file according to your needs. Even the parameter transfer is performed following standard COBOL procedures (the USING clause after the CALL command).

For example, in a standalone environment, CODE_PREFIX could be defined as follows in a Windows system:

CODE_PREFIX c:\prog1;c:\prog2

and as the following in a UNIX system:

CODE_PREFIX /usr/prog1:/usr/prog2