- 1 Getting started
- 2 Compile
- 3 Customize
- 4 Optimize
- 5 Debug
- 6 Non-standard extensions
- 7 System Routines
- 附录 A
- 附录 B
- 附录 E
- 附录 I
I.1 General instructions
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 include
other files with the directive include
.
- Example
include
my-runtime-configuration-file
To include
another 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论