Skip to content

COBOL-IT Runtime Options

Usage: cobcrun [param ...] PROGRAM

Runtime parameters

Parameter Description
-checkpoint <file> Sets checkpoint filename
-console, -c Creates a new console
-debug, -d Suspends and waits for debugger
-debug, -d -remote -r Same as -debug but uses a separate file for events
-help,-h Prints this help
-reload Reloads checkpoint
-version, -V Display runtime version

COBOL-IT runtime environment variables

The following environment variables are used by cobcrun, or by the COBOL-IT native executable at run time.

  • COB_CALL_CASE=xul [where x=exact match, u=uppercase, l=lowercase]

  • COB_LOAD_CASE=xul [where x= exact match, u=uppercase, l=lowercase]

COB_CALL_CASE and COB_LOAD_CASE should be used together, and affect the behavior of the CALL statement, as regards algorithms applied when locating the target of the CALL statement.

When COBOL-IT executes a CALL "[Symbol]" statement, the default behavior for the runtime is to look first in memory for:

  1. An exact case match of "[Symbol]",
  2. "[Symbol]" in upper case,
  3. "[Symbol]" in lower case.

If "[Symbol]" is not found in memory, the runtime will then look for a filename with:

  1. An exact case match of "[Symbol]",
  2. "[Symbol]" in upper case,
  3. "[Symbol]" in lower case.

The first match is used.

COB_CALL_CASE and COB_LOAD_CASE provide the user with control over this lookup process, as follows:

  • COB_CALL_CASE=xul controls the behavior of "[Symbol]" lookup in memory.

  • COB_LOAD_CASE=xul controls the behavior of "[Symbol]" lookup in a filename on disk.

Where the letters xul represent three letters, each of which may be set to Y or N, to set whether or not the x (exact match check), u (uppercase check) or l (lower-case check) is performed.

Default settings are:

  • COB_CALL_CASE=YYY

  • COB_LOAD_CASE=YYY

An example of a usage, in which only exact case matching would be applied for a symbol in memory would be, while upper-case and lower-case matching for the filename is preserved:

  • export COB_CALL_CASE=YNN

  • export COB_LOAD_CASE=YYY

COB_CONSOLE_CP=<code page>

Sets the Windows console code page to <code page>.

COB_CONSOLE_CP is available in Windows only.

COB_CURRENT_DATE

The COB_CURRENT_DATE runtime environment variable can be used to control the results of the ACCEPT FROM DATE YYYYMMDD statement. Format is yyyy-mm-dd

In Windows:

  >set COB_CURRENT_DATE=2015-01-31
  .
In Linux/Unix:

  >export COB_CURRENT_DATE=2015-01-31
  77 the-date PIC 9(8).
  .
  ACCEPT the-date FROM DATE YYYYMMDD .
  DISPLAY the-date line 10 col 10.

Alternatively, you can use the SET verb to set COB_CURRENT_DATE, as follows:

SET ENVIRONMENT "COB_CURRENT_DATE" TO "2011-01-31".

In each of these cases the variable the-date would be returned as 20110131 instead of the current date, as would be expected if COB_CURRENT_DATE were not set.

Note

The ACCEPT FROM DATE statement now checks once to determine whether the COB_CURRENT_DATE environment variable is set. If it is set, then the value is stored in cache, and is retrieved by the ACCEPT FROM DATE statement.
If it is not set, then COB_CURRENT_DATE is not re-checked, and the ACCEPT FROM DATE statement applies its default behavior of retrieving the date from the system.

COB_DEBUG_ALLUSER=1

The COB_DEBUG_ALLUSER environment variable, when set to 1, and when defined before running a COBOL program, causes the pipes that are created by the debugger to communicate with cobcdb to have an attribute mask of 777, which provides READ/WRITE attributes for all users.

Where cob_init( . . .) has already been called, the same effect can be achieved by calling: cob_debug_acl_alluser(rtd,1);

This will also ensure that the pipes that are created by the debugger to communicate with cobcdb have READ/WRITE attributes for all users.

Note

Usage of COB_DEBUG_ALLUSER, and/or COB_DEBUG_TMP may be indicated if you receive this error message opening a pipe created by the debugger: Error opening /[path]/debug_xxx.cit for write (13: Permission denied)

COB_DEBUG_ID=<debug-id>

Defines a numeric ID that may be used to catch the program instead of the process id (PID). When defined, a debugger may attach to the program using the COB_DEBUG_ID.

Before running the program in debug, define the environment variable COB_DEBUG_ID, for example:

export COB_DEBUG_ID= <debug-id> where <debug-id> is an integer.

Attach to the program using the debug-id:

For details on the debug attach functionality, see the documentation of the C$DEBUG library routine.

At run time you must define the runtime environment variable: COB_DEBUGDB=<DebugDB-name>

When compiling with -debugDB=<DebugDB-name>, the compiler will modify the way debugging information is stored at compile-time. Instead of storing the metadata in the compiled object, the metadata will be stored in an SQLite3 database named by <DebugDB-name>.

The COB_DEBUGDB=<DebugDB-name> runtime environment variable allows the runtime to locate this file during a debugging session, and use the debugging information. Currently only 1 database may be use at a time. As a consequence, the user must use the same database for all of the programs in his run unit.

COB_DEBUG_MODULES=<program-id1>:<program-id2>

COB_DEBUG_MODULES is a list of program-ids, in which the entries are separated by a colon character ":". Adding the program-id of a program in your application to the list of COB_DEBUG_MODULES causes the debugger to break at the entry of that program.

This provides an alternative way to attach the debugger to a running process in cases where programs do not contain calls to "C$DEBUG", or where you do not have access to the remote attach interface in the Developer Studio.

COB_DEBUG_STARTUP_FILE=<filename>

The console debugger cobcdb can locate source files that have been re-located after compilation using the COB_DEBUG_STARTUP_FILE runtime environment variable and invoking the replace debugger command.

The COB_DEBUG_STARTUP_FILE runtime environment variable is set to the name and location of a file containing any number of commands that are executed when cobcdb is started.

Open <filename> and place the "replace" commands on separate lines:

       replace /opt/cobol-it-64/samples/test:/opt/cobol-it-64/samples/src
       replace ?

Save <filename> and export the COB_DEBUG_STARTUP_FILE environment variable.

export COB_DEBUG_STARTUP_FILE=<filename>

To locate a source file that has been moved, and associate it with an object compiled for debug, use the 'replace' debugger command, which changes the path to the source file.

The syntax is as follows:

replace <oldprefix> : <newprefix>

The replace debugger command allows you to replace the location where the source files associated with the program being debugged are stored.

The replace debugger command replaces any prefix of the full pathname, so the command replace /dirA : /dirB will allow any program that was originally compiled in /dirA/dev/sources to have its source stored in /dirB/dev/sources.

Subsequent commands are stacked, so when typing two more commands as follows:

      replace /dirC : /dirD
      replace /dirE : /dirF

you will end up with a list of three possible replacements. Only the first matching replacement will be executed.

Further usages include:

replace <no arguments> - Resets the list, removing active replacements. replace ? - Produces a list of active replacements.

Note that replace only affects the output of the list command.

The list debugger command allows you to expand the source you can see inside the console debugger as you execute your debugger commands.

COB_DEBUG_TMP=<directory>

COB_DEBUG_TMP control where the files and pipes created by the debugger are stored. Default is: /tmp

The runtime debugger uses named pipes to communicate. These are pipes with a file name, and by default, they are located in /tmp. You may relocate them by defining the COB_DEBUG_TMP environment variable.

This variable can be set in the login script of the user used to connect the remote debugger, as defined in the remote connection tab of the Developer Studio. This variable can also be set in the local runtime environment. It does not need to be set in both locations. If it is set in both locations, the settings should be identical, or the settings will be ignored, and the default value of /tmp will be used.

The COB_DEBUG_TMP environment variable may be required when debugging remotely attaching to a running process using the Developer Studio Remote System Explorer. This could be the case if COBOL-IT user:group that the program is running under have different permissions on pipe files created by default in the /tmp directory than the user:group of the user running the debugger. This problem is resolved by use of the COB_DEBUG_TMP environment variable which can be used to relocate the named pipes used by the runtime debugger into a directory in which the permissions of the user:group running the program and the permissions of the user:group running the debugger are the same.

Note

Usage of COB_DEBUG_ALLUSER, and/or COB_DEBUG_TMP may be indicated if you receive this error message opening a pipe created by the debugger:

Error opening /[path]/debug_xxx.cit for write (13: Permission denied)

COB_DISPLAY_PRINTER=<filename>

The COB_DISPLAY_PRINTER runtime environment variable defines a file that is appended to for each DISPLAY UPON PRINTER statement. Each DISPLAY UPON PRINTER statement OPENs this file, WRITE's to the file, and then CLOSE's the file.

COB_DUMP=<filename>

Designates the filename used to dump memory information, when a program aborts that has been compiled with the -fmem-info compiler flag.

When set to N/NO: No dump is produced.

If COB_DUMP is not set then the memory information is dumped to the file named by the COB_ERROR_FILE environment variable.

If COB_ERROR_FILE is also not set, memory information is written to stderr.

The output of this dump has been enhanced by adding the memory address of each field.

As an example:

       WORKING-STORAGE
              RETURN-CODE [6AEF4438] = +000000000
              TALLY [6AEF4440] = +000000000
              SORT-RETURN [6AEF4448] = +000000000
              NUMBER-OF-CALL-PARAMETERS [6AEF4458] = +000000000

COB_ERROR_FILE=<filename>

Designates the filename used to receive all runtime error messages that would otherwise be sent to stderr. When writing an error message, the runtime will create the specified filename if it does not exist, and will append to it if it does exist.

COB_EXTFH=<EXTFH Entry>

Defines the EXTFH handle name to be used for all COBOL files.

At run time, if the COB_EXTFH environment variable is defined (and no additional variables are included to specify what library to load), the runtime looks for lib$(COB_EXTFH) on UNIX and $(COB_EXTFH)_dll.dll on Windows in the COBOL-IT installation directory and all directories indicated in the COB_LIBRARY_PATH.

To use D-ISAM through EXTFH: >export COB_EXTFH=disamextfh

Libdisamextfh.so will be found and loaded into the CIT distribution directory (COBOLITDIR).

The D-ISAM indexed file engine includes a check utility: dcheck Dcheck is available on all Linux, UNIX and Windows systems.

To use BerkeleyDB through EXTFH: >export COB_EXTFH=bdbextfh

To use VBISAM through EXTFH*: >export COB_EXTFH=vbisamextfh

*In version 3.10, VBISAM is the default file system, and does not require setting the COB_EXTFH environment variable. However, in the future releases of Version 4.x, D-ISAM will replace VBISAM as the default file system, and use of VBISAM will require this setting.

To use C-Tree through EXTFH:

   COB_EXTFH=CTEXTFH; export COB_EXTFH
   COB_EXTFH_LIB=/opt/mytools/lib/liba.so:/opt/mytools/lib/libb.so; export COB_EXTFH_LIB
These file systems can be used with all COBOL-IT tools including CitSORT.

COB_EXTFH_FLAT=<EXTFH Entry>

Defines the EXTFH handle name to be used for all COBOL flat files (SEQUENTIAL non-indexed and RELATIVE).

Example: COB_EXTFH_FLAT=MyEXTFH; export COB_EXTFH_FLAT

COB_EXTFH_INDEXED=<`EXTFH Entry>

Defines the EXTFH handle name to be used for all COBOL indexed files

Example:

  COB_EXTFH_INDEXED=BDBEXTFH; export COB_EXTFH_INDEXED 
  COB_EXTFH_LIB=/opt/COBOL-it/lib/libbdbextfh.so; export COB_EXTFH_LIB

COB_EXTFH_LIB=[list of shared libraries]

Iterates a colon-separated ':' list of external shared libraries on (Unix,Linux) or a semi-colon-separated l ';' list of external shared libraries on Windows. The list of shared libraries is preloaded at start-up, and provides the reference to the COBOL-IT runtime, for locating the EXTFH handler defined by COB_EXTFH, COB_EXTFH_INDEXED and COB_EXTFH_FLAT.

Example: COB_EXTFH_LIB=libbdbextfh.so:libdb-4.7.so; export COB_EXTFH_LIB

COB_FILE_CASE=[UPPER|LOWER]

Forces all file names to be converted to upper/lower case.

COB_FILEMAP_CASE=[UPPER/LOWER]

Forces the runtime to convert all literals that are the target of ASSIGN EXTERNAL clauses that are associated with environment variables to upper/lower case before trying to resolve the name of the environment variable associated with the file.

Example: SELECT myfile ASSIGN EXTERNAL "FileA"....

  • When there is no setting of COB_FILEMAP_CASE, the runtime looks for an environment variable named FileA.
  • When COB_FILEMAP_CASE=UPPER, the runtime looks for an environment variable named FILEA.
  • When COB_FILEMAP_CASE=LOWER, the runtime looks for an environmen variable named filea.

COB_FILE_PATH=[PATH]

Designates the path to data files used by the application. COB_FILE_PATH is prepended to datafile names by the runtime as it works to resolve filenames and locations.

Example: COB_FILE_PATH=./data; export COB_FILE_PATH

COB_FILE_RELATIVE_MF=Y

Default is: N

When set to Y: The COBOL-IT runtime assumes the Micro Focus format for relative files for both READ and WRITE operations.

COB_FILE_TRACE=[Y/N]

Default is: N

When set to Y:
File tracing information is output to the file named by COB_ERROR_FILE, which includes information on how the runtime resolves file names on OPEN, and also status codes returned from unsuccessful file i-o operations. The COB_FILE_TRACE runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_FILE_TRACE runtime environment variable can be made during the runtime session.

COB_FULL_CANCEL=[Y/N]

Default is: N

Affects the behavior of the CANCEL statement which, by default, causes a "Logical Cancel" to be implemented.

When set to Y: All CANCEL statements performed in the running program cause a "Full Cancel" to be implemented.

This behavior can also be achieved by setting the compiler configuration file flag: full-cancel:Y.

Clarifications on the difference between a "Logical Cancel" and a "Full Cancel":

  • In a "Logical Cancel", the Working-Storage Section is reset to its initial values. Working-Storage initial values are the values set the first time the module was loaded in memory.

  • In a "Full Cancel", the Working-Storage Section is reset to its initial values, and the module binary is unloaded, if possible, from memory. Unloading the module binary from memory is only possible if the module is not being used in another region/thread, and it has been loaded by a CALL STATEMENT (not by a preload of a shared library).

COB_KEY_DUP_ALWAYS_22=[Y/N]

Default is: N

When set to Y:

Causes an error code of 22 to be returned if an attempt is made to add a record that results in a duplicate key error condition.

By default, COBOL-IT returns an error code of 21 if an attempt is made to add a record that results in a duplicate key error condition.

COB_LIBRARY_PATH =[PATH]

Designates the path to shared objects that will be executed with cobcrun.

COB_LIBRARY_PATH is prepended to shared object names that are CALL'ed by the runtime as it works to resolve called object names and locations.

COB_LOAD_CASE=[UPPER/LOWER]

Controls the case transformation when looking for an external program in a CALL statement.

When set to LOWER: The CALL'ed name is converted to lower case.

When set to UPPER: The CALL'ed name is converted to upper case. Otherwise, the name remains unchanged.

COB_LOAD_PRIORITY=[Y/N]

Default is: N

When set to no:
To resolve "myprog" in the phrase CALL "myprog", the default behavior is first to look for the symbol "myprog" in the linked library. Then if the symbol is not found, the runtime searches for a shared library (myprog.cit, myprog.dll (Windows) or myprog.so (Linux/UNIX)) and searches for the symbol myprog in the shared library.

When set to yes:
The search order is reversed. The runtime first looks for the shared library and if the symbol is not found, it then looks into the linked symbols.

Setting the COB_LOAD_PRIORITY environment variable provide the ability at runtime to produce the effect created by using the module-load-priority=y compiler configuration file flag at compilation time.

COB_LS_DOS=[Y/N]

Default is: N

When set to Y/YES:
The record delimiter for LINE SEQUENTIAL files is set to CR/LF. The COB_LS_DOS runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_LS_DOS runtime environment variable can be made during the runtime session.

COB_LS_FIXED=[Y/N]

Default is: N

When set to Y/YES:
LINE SEQUENTIAL files are processed as RECORD SEQUENTIAL FILE's. The COB_LS_FIXED runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_LS_FIXED runtime environment variable can be made during the runtime session.

COB_LS_NULLS=[Y/N]

Default is: Y

When set to Y:
Causes LINE SEQUENTIAL files to escape all values less than 0x20 with a null (0) value. The COB_LS_NULLS runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_LS_NULLS runtime environment variable can be made during the runtime session.

COB_NO_DOT_DAT

When set to Y: The COB_NO_DOT_DAT runtime environment variable instructs the VBISAM indexed file driver to not append .dat to the data file. The index file still is created with a .idx extension.

COB_NO_SIGNAL=[Y/N]

Default is: N

When set to Y:
Causes the runtime to not catch the signal which lets the system build a core dump. Setting COB_NO_SIGNAL can improve performance, while reducing the diagnostic capabilities of the runtime.

COB_PAD_BUG=[0/1]

Default is: 0

The runtime environment variable COB_PAD_BUG compensates for a bug that was detected in the handling of variable length RECORD SEQUENTIAL files (REC MODE "V") created in a COBOL-IT version prior to version 3.5.8 that was greater than 2GB in size, and that was created using the compiler configuration flag variable-rec-pad-mf: yes.

When the user had set variable-rec-pad-mf: yes, then when a record sequential file exceeded 2GB in size, all records whose last character address was larger that 2GB(0x80000000) were written with an additional 4- byte low-value filler. This anomaly did not occur when record addresses were smaller than 2GB (0x80000000).

Prior to version 3.5.8, this extra padding was not detected by the COBOL-IT runtime, and did not affect the handling of the data in the file. However, the extra 4-byte low-value filler did cause errors when using external tools, such as Syncsort.

With the correction of this problem, the COBOL-IT runtime will detect the extra padding condition, and these files will not be READable if the environment variable COB_PAD_BUG=1 is not set.

While setting the environment variable COB_PAD_BUG=1, the old behavior of adding extra padding when writing records whose last character address is larger that 2GB is preserved, and the ability to read these records is preserved.

To rebuild a file that has been corrupted in this manner, set the environment variable COB_PAD_BUG=1, use the COBOL configuration file setting variable-rec-pad-mf:yes, and run a program which READ's through the file with records containing extra padding, and WRITE's the records back out to a flat file with non-variable length (REC MODE "F"). Then, set the environment variable COB_PAD_BUG=0, use the configuration file setting variable-rec-pad-mf:yes, and run a second program which READ's the flat file, computes the length of the variable-length record, and and WRITE's the records back out to a flat file with variable length (REC MODE "V"). Note that two separate programs are required, as COBOL-IT reads the COB_PAD_BUG environment variable just once when the runtime starts.

The COB_PAD_BUG runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_PAD_BUG runtime environment variable can be made during the runtime session.

COB_PRE_LOAD=[list of modules]

Iterates a colon-separated ':' list of external shared libraries on (Unix,Linux) or a semi-colon separated l ';' list of external shared libraries on Windows. The list of shared libraries is preloaded at start-up.

COB_PROFILING_DIR

When compiling with the -fprofiling compiler flag, the runtime will check for the COB_PROFILING_DIR environment variable, and generate the profiling data file in that directory if it is defined. Otherwise, the profiling data file is created in the same directory as the source file.

The COB_PROFILING_DIR environment variable requires a trailing slash.

As an example, in Linux/UNIX environments: >export COB_PROFILING_DIR=mydir/

As a result, the output file is generated as mydir/cob_profiling_<pid>_final.xls.

In Windows environments:

>set COB_PROFILING_DIR=mydir\

As a result, the output file is generated as mydir\cob_profiling_<pid>_final.xls

COB_PROFILING_EACH_MODULE

The COB_PROFILING_EACH_MODULE runtime environment variable, when set to Y, causes the profiler to revert to the old profiling behavior, in which the .xls file is output at the exit of each module in an application.

COB_RTL_CP=<codepage>

Names the code page for Right-to-Left languages such as Hebrew.

Define the environment variable COB_RTL_CP=<codepage> where <codepage> is the code page of the Right To Left Language. Then when displaying a string, the part of the string that must be written Right to left will be inverted.

Note that in Windows environments, if you define the environment variable COB_CONSOLE_CP=<codepage> the codepage of the console is changed at program startup. (This is equivalent to DOS command chcp<codepage>). Currently for Hebrew (1255, 8859-8, 862) are supported.

COB_RUNTIME_CHECK_TRACE=[Y/N/Module list separated by ; or : (Windows)]

This environment variable should be used with caution.

The COB_RUNTIME_CHECK_runtime environment variable affects the behavior of the "subscript out of bounds" runtime check that is made when compiling with -g -debug, and optionally with -fmem-info.

When set to Y:
The "subscript out of bounds" will not force the runtime to abort, but to generate a message referencing the line on which the condition was detected. Messages generated will be written to the COB_ERROR_FILE if it is defined, otherwise, they will be written to stdout. No memory dump is produced, even if the COB_DUMP environment variable is set and the program is compiled with -fmem-info.

Consider a case where a program has a table with 5 elements, but a PERFORM loop increments the subscript 10 times. When COB_RUNTIME_CHECK_TRACE is set to N (the default), the "subscript out of bounds" condition forces the runtime to abort when the first out of bounds condition is detected. If the program is compiled with -fmem-info and the COB_DUMP environment variable is set, a memory dump is written to the COB_DUMP file.

When COB_RUNTIME_CHECK_TRACE is set to Y, the runtime will continue to run, producing output as the subscript continues to increment, as seen below:

  C:/COBOL/COBOLIT/Samples/test.cbl:20: libcob: Subscript of 'sample-element' out of bounds: 6
  C:/COBOL/COBOLIT/Samples/test.cbl:20: libcob: Subscript of 'sample-element' out of bounds: 7
  C:/COBOL/COBOLIT/Samples/test.cbl:20: libcob: Subscript of 'sample-element' out of bounds: 8
  C:/COBOL/COBOLIT/Samples/test.cbl:20: libcob: Subscript of 'sample-element' out of bounds: 9
  C:/COBOL/COBOLIT/Samples/test.cbl:20: libcob: Subscript of 'sample-element' out of bounds: 10

When set to Module list separated by ";" or ":" (Windows): COB_RUNTIME_CHECK_TRACE is set to Y only with the listed modules.

Note

The module list must be surrounded by single-quotes in Linux/UNIX, and not surrounded by single-quotes in Windows.

In Linux/UNIX, the module list must be surrounded by single-quotes:

Example: >export COB_RUNTIME_CHECK_TRACE='module1;module2'

In Windows, the module list must not be surrounded by single-quotes, and both the ";" and ":" characters are accepted as module delimiters.

Example:

>SET COB_RUNTIME_CHECK_TRACE=module1;module2

or

>SET COB_RUNTIME_CHECK_TRACE=module1:module2

COB_SCREEN_DISABLE_REFORMAT=[Y/N]

Default is: N

When set to Y:
Disables the reformatting associated by default with the COB_SCREEN_UPDATE_FIRST_KEY_ERASE behavior.

COB_SCREEN_ESC=[Y/N]

Default is: N

When set to Y:
Enables use of the escape key.

When COB_SCREEN_ESC=Y, and COB_SCREEN_EXCEPTIONS=Y, the COBOL-IT runtime will return the CRT Status value as described in the table below:

Condition Key Pressed Cit Value returned to CRT-STATUS-VAR
Where COB_SCREEN_ESC=Y Esc 2005

COB_SCREEN_EXCEPTIONS=[Y/N]

Default is: N

When set to Y:
Enables the use of the Page Up, Page Down, Up Arrow, and Down Arrow keys on Field-level ACCEPT statements. Also enables the use of the escape key when COB_SCREEN_ESC=Y.

When COB_SCREEN_EXCEPTIONS=Y, the COBOL-IT runtime will return the CRT Status values as described in the table below. Note that Page Up, Page Down, Up Arrow, and Down Arrow are enabled by default when ACCEPTing a Screen:

Condition Key Pressed Cit Value returned to CRT-STATUS-VAR
On ACCEPT <Screen> or on ACCEPT <Field> where COB_SCREEN_EXCEPTIONS=Y Page Up 2001
Page Down 2002
Up Arrow 2003
Down Arrow 2004
When COB_SCREEN_ESC=Y Escape Key 2005
Print 2006

COB_SCREEN_INPUT_BOLDED=[Y/N]

Default is: N

When set to Y: Causes all input fields to be displayed in bold.

COB_SCREEN_INPUT_FILLER=[char]

When set to [char], changes the PROMPT character to [char].

COB_SCREEN_INPUT_INSERT_TOGGLE=[Y/N]

Default is: N

When set to Y: Causes the INS Key to toggle between Overwrite and Insert mode. The default behavior of the INS key is to insert a SPACE at the current cursor position.

COB_SCREEN_INPUT_REVERSED=[Y/N]

Default is: N

When set to Y: Causes all input fields to be displayed in REVERSE.

COB_SCREEN_INPUT_UNDERLINED=[Y/N]

Default is: N

When set to Y: Causes all input fields to be displayed with UNDERLINE.

COB_SCREEN_RAW_KEYS=[Y/N]

Default is: N

When set to Y: Enables use of the "raw keys".

The "raw keys" are the Home, End, Insert, Delete, and Erase EOL keys. When COB_SCREEN_RAW_KEYS=Y, the COBOL-IT runtime will return CRT Status values as described in the table below:

Condition Key Pressed Cit Value returned to CRT-STATUS-VAR
Where COB_SCREEN_RAW_KEYS=Y Home 2007
End 2008
Ins 2009
Del 2010
Erase EOL \2011

COB_SCREEN_UPDATE_FIRST_KEY_ERASE=[Y/N]

Default is: N

When set to Y: Causes all field-level ACCEPT WITH UPDATE statements to behave as described below.

If the first key pressed when entering the field is an alpha/number key the field is erased, and the keystroke recorded. Reformatting rules are applied when exiting the field if the number of characters entered is fewer than can be held by the field.

Consider an example:

A field-level ACCEPT WITH UPDATE is being done on a numeric data element described as PIC 9(4). The user enters a single digit "1", and exits the field. The environment variable COB_SCREEN_UPDATE_FIRST_KEY_ERASE is set to "Y".

Prior to recording the keystroke, the runtime initializes the field to zeroes. Then, the runtime records the keystroke of "1" in the first character position, then exits the field.

In many (perhaps most) cases, the user will expect the data item to reformat from 1000 to 0001.

This reformatting is the default behavior when COB_SCREEN_UPDATE_FIRST_KEY_ERASE is set to "Y".

For the cases where this reformatting is not desired, the user can disable this default behavior with the COB_SCREEN_DISABLE_REFORMAT behavior, as described below.

The runtime environment variable COB_SCREEN_DISABLE_REFORMAT, when set to Y, disables the reformatting associated by default with the COB_SCREEN_UPDATE_FIRST_KEY_ERASE behavior.

COB_STDUNIX=[Y/N]

Default is: N

Windows-only. When set to Y/YES, stdin, stdout, and stderr are opened in binary mode. This means that the EOL (end of line) character used is LF (line-feed) only, as opposed to CR/LF, which is the default in Windows operating environments.

COB_SWITCH_0... COB_SWITCH_16

Setting any of the COB_SWITCH_1 thru COB_SWITCH_16 environment variables provides a way for the user to set the corresponding SWITCH 0 thru SWITCH 16 declared in SPECIAL-NAMES to either an ON or OFF state.

For example:

   SET COB_SWITCH_1=ON
   >cobcrun switchtest

This example provides a way for the program switchtest, in which SWITCH 1 is declared in SPECIAL-NAMES, to run with SWITCH 1 set to an ON STATUS.

COB_SYNC=[Y/N]

Default is: N

When set to Y: Causes all WRITE operations to be followed by a flush to disk.

Warning

This option may degrade the performance of your program. The COB_SYNC runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_SYNC runtime environment variable can be made during the runtime session.

COB_VAR_REC_PAD=[Y/N]

Default is: N

The COB_VAR_REC_PAD runtime environment variable affects padding rules applied to variable length sequential records.

When set to Yes: Variable size RECORD SEQUENTIAL records (REC MODE 'V') are stored with padding characters at the end to ensure that the next record starts on a 4 byte boundary. The COB_VAR_REC_PAD runtime environment variable is evaluated when the OPEN statement is executed by the runtime. Changes to the COB_VAR_REC_PAD runtime environment variable can be made during the runtime session.

COBLPFORM="n:n:n: : : : : : : : :n"

Provides a way to emulate printer channels C01 through C12 by line feeds and form feeds.

With the implementation of the environment variable COBLPFORM, COBOL-IT can emulate the printer channels C01 through C12 by line feeds and form feeds. The environment variable COBLPFORM provides a syntax that allows the user to define line numbers on the form, and to associate printer channels with those line numbers.

Syntax:

>COBLPFORM="n:n:n: : : : : : : : :n"; export COBLPFORM

Parameters: n: are colon-delimited numeric digits which assign a line number to a printer channel. Note that the colon ":" position represents the printer channel number, while n represents the line number assigned to that printer channel. Printer channels that have been assigned line number 0, or described with one of the mnemonics S01, S02, CSP are set to line 1, at the beginning of the page. Up to 12 printer channels can be described in this fashion.

Example:

To set channel 1 to line 2, channel 2 to line 3, and channel 12 to line 60.

   >COBLPFORM="2:3: : : : : : : : : :60"
   >export COBLPFORM

COBOLITDIR=<directory>

Default is /opt/COBOL-it on UNIX/Linux-based systems and C:\COBOL\COBOLIT on Windows-based systems.

Names the directory in which COBOL-IT is installed.

TMPDIR or TMP=<directory>

Default is /tmp on UNIX/Linux-based systems and the local user's AppData\Local\Temp directory on Windows-based systems.

Designates the directory where temporary files are stored.

Note

The default TMPDIR setting is returned in the command "cobc -V". When compiling with the -save-temps compiler flag, temporary files are stored in the current directory.

Back to top