Configuring the Runtime

When used as a helper application or viewer, the ACUCOBOL-GT runtime is invoked to execute a single file. If your application contains more than a single object file, it must be packaged in a library file that "packages" all of the objects and associated resources of your application into a single file. For more information, see Packaging Your Application and Resources.

There are two ways to configure the runtime for use as a helper application:

If you choose the library file method and the library contains a configuration file, the client machine must be set up to specify the name of the configuration file when users define the runtime as a helper application in their browser. Be aware, however, that this will affect all COBOL applications that your users run as a helper application. For instructions, see Defining the Runtime as a Helper Application or Viewer.

If you choose to configure the runtime programmatically, you should use the SET CONFIGURATION (or SET ENVIRONMENT) phrase in your source code.

For example, if your application uses a configuration file with the following entries:

FILE_PREFIX @hal:/u2/serverfiles
COMPRESS_FILES 1
KEYSTROKE EDIT=PREVIOUS EXCEPTION=52 kl

Add the following lines to your COBOL initialization code:

SET CONFIGURATION "FILE_PREFIX" TO "@hal:/u2/serverfiles".
SET CONFIGURATION "COMPRESS_FILES" to "1".
SET CONFIGURATION "KEYSTROKE" TO "EDIT=PREVIOUS EXCEPTION=52 kl"

Note that MAX_FILES, MAX_LOCKS, and LOCKS_PER_FILE cannot be modified using the SET verb and that the COBOL program can read environment variables using ACCEPT FROM CONFIGURATION (or ACCEPT FROM ENVIRONMENT).