返回介绍

I.1 General instructions

发布于 2023-07-03 22:07:03 字数 3220 浏览 0 评论 0 收藏 0

The initial runtime.cfg file is found in the $COB_CONFIG_DIR , which defaults to installdir/gnucobol/config (see cobcrun --info for the local path that is configured). The environment variable COB_RUNTIME_CONFIG may define a different runtime configuration file to read.

If settings are included in the runtime environment file multiple times then the last setting value is used, no warning occurs.

Settings via environment variables always take precedence over settings that are given in runtime configuration files. And the environment is checked after completing processing of the runtime configuration file(s)

All values set to string variables or environment variables are checked for ${envvar} and replacement is done at the time of the setting. You can also specify a default value for the case that envvar is not set: ${envvar:default} (the format ${envvar:-default} is supported, too).

Any environment variable may be set with the directive setenv .

Example

setenv COB_LIBARAY_PATH ${LD_LIBRARY_PATH}

Any environment variable may be unset with the directive unsetenv (one var per line).

Example

unsetenv COB_LIBRARY_PATH

Runtime configuration files can includeother files with the directive include .

Example

includemy-runtime-configuration-file

To includeanother configuration file only if it is present use the directive includeif . You can also use ${envvar} inside this.

Example

includeif ${HOME}/mygc.cfg

If you want to reset a parameter to its default value use reset parametername .

Most runtime variables have boolean values, some are switches, some have string values, integer values (if not explicit noted: unsigned) and some are size values. The boolean values will be evaluated as following: to true: 1, Y, ON, YES, TRUE (no matter of case) to false: 0, N, OFF.

A size value is an unsigned integer optionally followed by ‘K’, ‘M’, or ‘G’ for ‘kilo’, ‘mega’ or ‘giga’.

For convenience a parameter in the runtime.cfg file may be defined by using either the environment variable name or the parameter name. In most cases the environment variable name is the parameter name (in upper case) with the prefix COB_ .

For a complete list of the settings in use see cobcrun --runtime-config .

Note: If you want to slightly speed up a program’s startup time, remove all of the comments from the actual real configuration file that is processed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文