Operation [ Micro Focus COBOL System Reference, Volume 2 ] MPE/iX 5.0 Documentation
Micro Focus COBOL System Reference, Volume 2
Operation
When your RTS or statically linked executable file starts up, as part of
its initialization of the COBOL run-time environment it will try to read
your run-time configuration sidefile. It is shared by all users of the
Micro Focus COBOL system.
Run-time Configuration File
The run-time configuration file is a text file, which you can edit with
your standard text editor. It is an optional file (no error will be
issued if it does not exist) pointed to by the CONCONFIG environment
variable, or called $COBDIR/cobconfig if COBCONFIG is undefined (see the
appendix Micro Focus Environment Variables for more information on the
COBCONFIG environment variable). Each different configuration item
appears on a new line. Blank lines are ignored. A comment line is one
starting with a # (although because this file is processed at run time,
we advise that you limit your comments, in order to keep to a minimum the
time it takes to process it). The maximum number of characters permitted
in a comment line is 80, including any new-line or carriage return
characters that may be placed at the end of the line by some editors.
You can perform two types of configuration in the configuration file:
* setting environment variables, such as dd_ file-name mappings, or
other environment variables significant to Micro Focus COBOL
* setting run-time tunables. These control the behavior of certain
aspects of the run-time system.
Setting Environment Variables
The keyword "setenv" must begin the line, followed by:
1. one or more tabs and/or spaces, followed by:
2. the name of the environment variable, followed by:
3. one or more tabs and/or spaces, followed by:
4. the value to assign to the environment variable (the value must be
a single word, or multiple words within quotation marks).
Environment variables set in this way override values already set
in the environment.
For example:
setenv dd_MYFILE /usr/lib/mydir/myfile
setenv SOMESHORTNAMES "JOE FRED JACK MARY"
See the chapter External File-name Mapping for full details on dd_
file-name mapping.
Setting Run-time Tunables
The keyword "set" must begin the line, followed by:
1. one or more tabs and/or spaces, followed by:
2. the name of the run-time tunable, followed by:
3. "=", followed by:
4. the value to which to set the run-time tunable. This is validated
according to the type and values allowed for that run-time tunable
and the value of cobconfig_error_report. The following section
details the names of the run-time tunables and the values to which
you can set them.
Run-time Tunables
The following sections describe the run-time tunables available.
cobconfig_error_report.
Syntax:.
set cobconfig_error_report={TRUE|FALSE}
Value:.
TRUE or FALSE
If FALSE, do not report any errors during processing of the configuration
file.
Default:.
TRUE. Any errors detected will be reported and the RTS will terminate.
command_line_accept.
Syntax:.
set command_line_accept={TRUE|FALSE}
Value:.
TRUE or FALSE
If TRUE, the first ACCEPT takes the input from the command line.
Default:.
FALSE. The first ACCEPT will take the input from the user. This provides
direct ANSI conformance. You should set this if you want to execute a
program which has been generated from convert3 or convert5.
command_line_linkage.
Syntax:.
set command_line_linkage={TRUE|FLASE}
Value:.
TRUE or FALSE. If TRUE, enables you to call a program and pass the
command line to the main program as a paramter to be accessed via the
Linkage Section. See the chapter Writing Programs in your COBOL User
Guide for information on passing the command line to a main program.
Default:.
TRUE
dynamic_dictionary_limit.
Syntax:.
set dynamic_dictionary_limit=integer
Value:.
integer
where integer is the maximum size of memory to be allocated dynamically
at run time for use by virtual heaps.
The Compiler and Generator use virtual heaps when processing your
programs, and this size is operating system dependent. If the memory
limit is exceeded, the memory allocated to virtual heaps will be paged by
the Micro Focus COBOL system onto disk. If the amount of memory
allocated to virtual heaps is not large enough to process your programs,
then the compilation and generation times may be increased due to the
overheads of paging the virtual heap accesses to disk.
This run-time tunable is equivalent to the -d run-time switch. The value
of -d will be used if the values are different.
Default:.
30 buffers of 8K.
dynamic_memory_limit.
Syntax:.
set dynamic_memory_limit=integer
Value:.
integer
where integer is the maximum size of memory to be allocated dynamically
at run time, and is operating system dependent. Any CANCELs performed
before this memory limit is reached will not release the memory occupied
by the program being CANCELed, so that the program is available to be
reused and hence CALL/CANCEL performance will be greatly increased. This
mode of working is called "logical Cancels".
As far as your program is concerned, the behavior of logical and real
CANCELs is identical. If the dynamically allocated memory requirements
exceed the size you set for dynamic_memory_limit, then all the memory
that should have been freed by any CANCELs is freed. If you set this
limit to zero, logical CANCELs will be disabled.
This run-time tunable is equivalent to the -i run-time switch. The value
of -i will be used if the values are different.
Default:.
Logical cancels will be used.
isam_block_size.
Syntax:.
set isam_block_size={512|1024|2048|4096}
Value:.
512, 1024, 2048 or 4096
Selects the block size to use when creating indexed files. Uses 512 to
create files with a block size of 512 bytes, 1024 to create files with a
block size of 1K, 2048 to create files with a block of of 1536 bytes, and
4096 to create files with a block size of 2K.
This tunable replaces the cobcf utility which was available on some
earlier products.
Default:.
1024.
isam_open_key_check.
Syntax:.
set isam_open_key_check={TRUE|FALSE}
Value:.
TRUE or FALSE
Specifies whether or not the key descriptions specified in the program
should be verified with those in an existing file during open processing.
Default:.
FALSE.
lock_mode.
Syntax:.
set lock_mode={0|1|2}
Value:.
0, 1 or 2
Selects the locking implementation to be used, as follows:
Lock Mode Description
-------------------------------------------------------
0 Uses the locking mechanism provided by
V1.3.0 and earlier versions.
1 Provides compatibility with DOS and OS/2
locking mechanisms.
2 Provides interlanguage locking. This
method causes record locks to lock the
physical record.
Default:.
0
long_filenames.
Syntax:.
set long_filenames={TRUE|FALSE}
Value:.
TRUE or FLASE
Specifies whether file-names longer than 14 characters are to be allowed.
If you create a file on a device that does not support long file-names
you must set long_filenames to FALSE when accessing that file on a device
that does support long file-names.
Default:.
TRUE
noretry_on_decl.
Syntax:.
set noretry_on_decl={TRUE|FALSE}
Value:.
TRUE or FALSE
Specifies whether or not locked records will be retried when declaratives
exist for the file, and the program has been compiled with RETRYLOCK
NORM.
NOTE This must be set in order to provide compatibility with COBOL V1.3.
Default:.
FALSE
program_search_order.
Syntax:.
set program_search_order={1|2|3}
Value:.
1, 2 or 3
Selects the program search order to be used as shown on the following
page.
Search
Order Description
1. Uses the following search sequence:
a. The run-time system is checked to see if the program is
statically linked.
b. If the COBPATH environment variable is set, the paths
specified are searched in order. Otherwise, the current
directory is searched.
c. The path in which the calling program was loaded is
searched.
d. If COBDIR is set, the path specified is searched.
Otherwise, /usr/lib/cobol is searched.
2. Uses the following search sequence:
a. The run-time system is checked to see if the program is
statically linked.
b. The path in which the calling program was loaded is
searched.
c. If the COBPATH environment variable is set, the paths
specified are searched in order. Otherwise, the current
directory is searched.
d. If COBDIR is set, the path specified is searched.
Otherwise, /usr/lib/cobol is searched.
3. Uses the following search sequence:
a. The run-time system is checked to see if the program is
statically linked.
b. The current directory is searched.
c. If the COBPATH environment variable is set, the paths
specified are searched in order.
d. If COBDIR is set, the path specified is searched.
Otherwise, /usr/lib/cobol is searched.
Set program_search_order to 2 for compatibility with previous UNIX
versions of Micro Focus COBOL, or to 3 for compatibility with previous
DOS versions.
NOTE If a program is called with a specific path the search sequence is
not affected by the program_search_order cobconfig variable and
instead:
1. The run-time system is checked to see if the program is
statically linked.
2. The path specified in the call is searched.
Default:.
1
same_proc_excl_detection.
Syntax:.
set same_proc_excl_detection={TRUE|FALSE}
Value:.
TRUE or FALSE
Detects if you have tried to open a file multiple times in one run unit.
If TRUE, any OPEN request will have conditions applied to determine
whether or not it is already open, and if so, if it was opened
exclusively, in which case a file error is generated. Currently, if the
same file is opened twice by the same run unit, no file error is
generated. This flag should be set to TRUE for RMCOBOL compatibility.
Default:.
FALSE.
shared_memory_segment_size.
Syntax:.
set shared_memory_segment_size=integer
Value:.
integer
where integer specifies, in bytes, the initial size of the shared memory
block allocated by the RTS. The minimum value you can specify for integer
is 8192 (8K).
Default:.
65536 (64 K)
skip_on_lock.
Syntax:.
set skip_on_lock={TRUE|FALSE}
Value:.
TRUE or FALSE
Specifies whether or not a READ WITH LOCK of a locked record in a program
compiled with the directive NODETECTLOCK will cause a subsequent READ
NEXT/PREVIOUS to reread the logical NEXT/PREVIOUS record or the currently
locked record.
Default:.
FALSE
Environment Variables
The environment variables available to you are described fully in the
main body of this manual. They are summarized in the appendix Micro
Focus Environment Variables.
MPE/iX 5.0 Documentation