Programmatic configuration

To configure the runtime programmatically, use the SET CONFIGURATION or SET ENVIRONMENT phrase in your source code. For example, if your application uses a configuration file with the 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".

MAX_FILES, MAX_LOCKS, and LOCKS_PER_FILE cannot be modified with the SET verb. These variables are used during the runtime initialization that occurs before the COBOL program is executed. In order to allow a wider range of applications to be used with the ACUCOBOL-GT Web Runtime, these variables have been given new default values.

When you are using the ACUCOBOL-GT Web Runtime, these variables are initialized to the following values:

MAX_FILES 255

MAX_LOCKS 512

LOCKS_PER_FILE 256

Note that the COBOL program can read environment variables using ACCEPT FROM CONFIGURATION (or ACCEPT FROM ENVIRONMENT).