4 Tuning

Some aspects of MSG and ERR systems can be tuned to the user’s requirements. Tuning of the two systems is done separately as potentially each could be using entirely different devices. (In practice they share the same device and use EMS at lower levels, so tuning ERR can affect MSG and vice versa.)

Tuning is performed by calling the subroutines MSG_TUNE and/or ERR_TUNE, giving a keyword to specify the parameter to be set, and a value. See the descriptions of MSG_TUNE and ERR_TUNE for details of the parameters and values available and for some further notes.

When the tuning subroutines are called, the given value may be overridden by setting an environment variable. The name of the environment variable is constructed by prefixing the string ‘MSG_’ or ‘ERR_’ to the tuning parameter name. An attempt is made to interpret the translation of the environment variable as an integer in the required range for the particular parameter.

For example, if the program contains:


and environment variable MSG_SZOUT is set to 0, no line wrapping occurs on output.

If the environment variable is set but the value is invalid, an error message is reported.

If a tuning subroutine is called with the tuning parameter name set to ’ENVIRONMENT’, the given value is ignored but an attempt is made to get values for all possible tuning parameters of the subsystem (MSG or ERR) from their associated environment variable.