返回介绍

I.2 General environment

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


Environment name:  COB_DISABLE_WARNINGS
  Parameter name:  disable_warnings
         Purpose:  turn off runtime warning messages
            Type:  boolean
         Default:  false
         Example:  DISABLE_WARNINGS  TRUE

Environment name:  COB_ENV_MANGLE
  Parameter name:  env_mangle
         Purpose:  names checked in the environment would get non alphanumeric
                   change to '_'
            Type:  boolean
         Default:  false
         Example:  ENV_MANGLE  TRUE

Environment name:  COB_SET_DEBUG
  Parameter name:  debugging_mode
         Purpose:  to enable USE ON DEBUGGING procedures that were active
                   during compile-time because of WITH DEBUGGING MODE,
                   otherwise the code generated will be skipped
            Type:  boolean
         Default:  false
         Example:  COB_SET_DEBUG  1

Environment name:  COB_SET_TRACE
  Parameter name:  set_trace
         Purpose:  to enable COBOL trace feature
            Type:  boolean
         Default:  false
         Example:  SET_TRACE  TRUE

Environment name:  COB_TRACE_FILE
  Parameter name:  trace_file
         Purpose:  to define where COBOL trace output should go
            Type:  string       : $ is replaced by process id
            Note:  file is opened for append if name starts with "+"
         Default:  stderr
         Example:  TRACE_FILE  ${HOME}/mytrace.$

Environment name:  COB_TRACE_FORMAT
  Parameter name:  trace_format
         Purpose:  to define format of COBOL trace output
            Type:  string
         Default:  "%P %S Line: %L"
                   %P is replaced by Program-Id/Function-Id minimal length 29
                      with prefix
                   %I is replaced by Program-Id/Function-Id variable length,
                      without prefix
                   %L is replaced by Line number, right justified, length 6
                   %S is replaced by statement type and name
                   %F is replaced by source file name 
         Example:  TRACE_FORMAT  "Line: %L %S"
            Note:  format of GC2.2 and older:
                   "PROGRAM-ID: %I 	Line: %L 	%S"

Environment name:  COB_CORE_ON_ERROR
  Parameter name:  core_on_error
         Purpose:  to enable operating system handling of signals and to
                   raise an ABORT signal on runtime error instead of the
                   default error handling, which will commonly kill the
                   process after creating a coredump
            Type:  0   means catching all default signals and do full
                       internal error handling as done in versions pre 3.2
                       along with full internal handling of COBOL runtime
                       errors
                   1   means to forward any signals; whatever happens
                       by means of system signal handers will happen,
                       which may include creating coredumps and killing
                       the process before libcob does any cleanup; preserve
                       full internal handling of COBOL runtime errors
                   2   is identical to 1, but on runtime errors explicit
                       raises SIGABRT after displaying it along with the  
                       stacktrace and after doing minimal cleanup
                   3   similar to 2, but instead of raising SIGABRT execute
                       "gcore -a -o NAME $" (where $ is the process id and
                       NAME is specified by COB_CORE_FILENAME) as early as
                       possible before doing the normal internal error
                       handling; if the command does not work or if a signal
                       handler was executed before a SIGABRT is raised
         Default:  0
         Example:  core_on_error 3
            Note:  If the operating system kills the process as part of the
                   signal handling no COBOL centric dump will be created and
                   no cleanup will be done either.
                   When catching a signal (for example 11) it will be
                   returned as exit code of the process, the generated
                   coredumps store the reason for the error in the variable
                   "runtime_err_str".

Environment name:  COB_CORE_FILENAME
  Parameter name:  core_filename
         Purpose:  to adjust the default name or specify a folder for a
                   COB_CORE_ON_ERROR=3 generated coredump
            Type:  string
         Default:  ./core.libcob
         Example:  core_filename /home/me/SomeApp.core

Environment name:  COB_STACKTRACE
  Parameter name:  stracktrace
         Purpose:  to disable stracktrace creation on abort
            Type:  boolean
         Default:  true
         Example:  STRACKTRACE  no

Environment name:  COB_DUMP_FILE
  Parameter name:  dump_file
         Purpose:  to define where COBOL dump output should go
            Note:  the -fdump=all compile option prepares for dump;
                   file is opened for append if name starts with "+";
                   may be disabled by setting it to "NONE"
            Type:  string       : $ is replaced by process id
         Default:  stderr
         Example:  DUMP_FILE  ${HOME}/mytrace.log

Environment name:  COB_DUMP_WIDTH
  Parameter name:  dump_width
         Purpose:  to define COBOL dump line length
            Type:  integer
         Default:  100
         Example:  dump_width 120

Environment name:  COB_CURRENT_DATE
  Parameter name:  current_date
         Purpose:  specify an alternate Date/Time to be returned to ACCEPT
                   clauses this is used for testing purposes or to tweak
                   a missing offset; partial setting is allowed
            Type:  numeric string in format YYYYDDMMHH24MISS or date string
         Default:  the operating system date is used
         Example:  COB_CURRENT_DATE "2016/03/16 16:40:52"
                   current_date YYYYMMDDHHMMSS+01:00


@section Call environment
@verbatim


Environment name:  COB_LIBRARY_PATH
  Parameter name:  library_path
         Purpose:  paths for dynamically-loadable modules
            Type:  string
            Note:  the default paths .:/installpath/extras are always
                   added to the given paths
         Example:  LIBRARY_PATH    /opt/myapp/test:/opt/myapp/production

Environment name:  COB_PRE_LOAD
  Parameter name:  pre_load
         Purpose:  modules that are loaded during startup, can be used
                   to CALL COBOL programs or C functions that are part
                   of a module library
            Type:  string
            Note:  the modules listed should NOT include extensions, the
                   runtime will use the right ones on the various platforms,
                   COB_LIBRARY_PATH is used to locate the modules
         Example:  PRE_LOAD      COBOL_function_library:external_c_library

Environment name:  COB_LOAD_CASE
  Parameter name:  load_case
         Purpose:  resolve ALL called program names to UPPER or LOWER case
            Type:  Only use  UPPER  or  LOWER
         Default:  if not set program names in CALL are case sensitive
         Example:  LOAD_CASE  UPPER

Environment name:  COB_PHYSICAL_CANCEL
  Parameter name:  physical_cancel
         Purpose:  physically unload a dynamically-loadable module on CANCEL,
                   this frees some RAM and allows the change of modules during
                   run-time but needs more time to resolve CALLs (both to
                   active and not-active programs)
           Alias:  default_cancel_mode, LOGICAL_CANCELS (0 = yes)
            Type:  boolean (evaluated for true only)
         Default:  false
         Example:  PHYSICAL_CANCEL  TRUE


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

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

发布评论

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