Terminfo Database and Terminal Devices | Compiling CGI Programs Created on NetExpress |
This appendix lists all the environment variables that can be set when using the Micro Focus COBOL system, and provides a brief summary of each one:
Environment Variable |
Summary |
---|---|
CCITCP2 | Locates TCP/IP registration program |
CCTRACE | Specifies the level of CCI tracing |
COBAIF | Locates Animator session (.aif) files |
COBANIM_2 | Enables cross-session and intra-session animation. |
COBANIMOPT | Specifies directives to Animator |
COBATTR | Selects appearance of HIGHLIGHT and LOWLIGHT |
COBCONFIG | Tailors run-time configurable options |
COBCPY | Locates copyfiles |
COBCTRLCHAR | Pass control codes transparently to terminal. |
COBDATA | Locates data files |
COBDIR | Locates COBOL system software |
COBIDY | Locates Animator information (.idy) files |
COBEXTFHBUF | Specifies that fixed length sequential files are to be buffered. |
COBHNF | Locates help system .hnf files |
COBKEYTIMEOUT | Tunes remote terminal response |
COBLPFORM | Sets logical printer channels |
COBOPT | Specifies user default cob options |
COBPATH | Locates programs for dynamic loading |
COBPRINTER | Directs output to a print spooler |
COBSW | Sets run-time system switches |
COBTERMINFO | Locates COBOL terminfo terminal database |
COLUMNS | Specifies screen width |
EXTFH | Specifies a configuration file for the Callable File Handler |
FS | Specifies a configuration file for Fileshare Server |
FSCOMMS | Specifies that the Fileshare System is to run in single user mode. |
LANG | Specifies the language environment |
LD_LIBRARY_PATH | Locates shared libraries |
LIBLIST | Locates special cob library list |
LIBPATH | Locates shared libraries |
LINES | Specifies screen depth |
MFEXTMAP | Specifies the location of the External File Mapper mapper file. |
SHLIB_PATH | Locates shared libraries |
TERM | Specifies terminal type |
TERMINFO | Locates UNIX system terminfo database |
TMPDIR | Locates directory for temporary files |
XFHTRACE | Enables the Callable File Handler's trace facility. |
Full details on these environment variables can be found in the main body of the manual set. dd_ routines provide an alternative method of assigning values to environment variables. These are detailed in the chapter File Naming in your Programmer's Guide to File Handling.
Note: The syntax in the following descriptions is shown as required for the sh and ksh. Other shells, such as csh, require a syntax of the form:
setenv env_var value
where the parameters are:
env_var | One of the environment variables shown on the following pages |
value | A value to which the environment variable can be set. |
Specifies the location of the TCP/IP cooperative process registration program. It is associated with the Common Communications Interface (CCITCP). See your Programmer's Guide to Communications.
CCITCP2=machine-name export CCITCP2
machine-name |
The location of TCP/IP, as listed in the TCP/IP hosts file. |
There are two methods of specifying the level of tracing: the CCITRACE environment variable and the control-buffer parameter passed to a CCI-Trace function call.
Specifies the style of the traced output.
CCITRACE=filename [options] export CCITRACE
filename |
The name of the log file you want the trace output to
go to. If you do not specify this parameter, the log file ccitrace.log
is created in the current directory with all options
set to their default states. |
options |
Can be any one, or all, of the following, and must be
upper case:
|
See the chapter Communications Programming with CCI in your Programmer's Guide to Communications for detailed information on CCI application call tracing.
Specifies the directory that Animator is to search for the session (.aif) file for the program being animated if it is not found in the same directory as the information (.idy) file. Animator can update the session file to record information held between sessions. There is also an Animator directive COBAIF, see the appendix Directives for Animator in your Programmer's Guide to Character Tools for details.
COBAIF=path-name export COBAIF
path-name |
The directory that Animator is to search. |
Enables cross-session and intra-session animation.
COBANIM_2=flag export COBANIM_2
flag |
A flag that indicates whether cross-session or
intra-session animation is being enabled. flag can be:
|
COBANIM_2=ANIMATE export COBANIM_2
For details on enabling cross-session and intra-session animation, see the chapter Animator in your Programmer's Guide to Character Tools.
Specifies directives to be used by Animator.
COBANIMOPT=directive-list export COBANIMOPT
directive-list |
A list of directives, each listed in the appendix Directives for Animator in your Programmer's Guide to Character Tools. Must not be a filename. |
COBANIMOPT="NOSCREENPAGE HILITE" export COBANIMOPT
When you invoke Animator, it first reads the directives you have specified in COBANIMOPT and then uses any directives you specify in the command line (that might override some of the directives you set in COBANIMOPT). For details on the format for specifying directives, see the chapter Animator.
Specifies non-standard behavior for HIGHLIGHT and LOWLIGHT clauses used with ACCEPT and DISPLAY statements. It provides compatibility with earlier COBOL products. You should avoid using it wherever possible as support can be discontinued at some future date.
COBATTR=n export COBATTR
See the chapter Terminfo Database and Terminal Devices for details on terminfo entries.
COBATTR=1 export COBATTR
Specifies a run-time configuration file that tailors the run-time configurable options in some way. See the chapter Run-time Configuration for information on available run-time configurable options.
COBCONFIG=path-name export COBCONFIG
path-name |
The name of the configuration file that tailors the run-time configurable options. |
COBCONFIG=/usr/mydir/cobconfig export COBCONFIG
Specifies the directory, or directories that the Compiler and Animator should search for copyfiles.
COBCPY=path-name[:path-name]... export COBCPY
path-name |
A directory that the Compiler and Animator are to
search when looking for copyfiles. When more than one path-name is
present, a null path-name represents the current
working directory.
|
COBCPY=/usr/group/sharedcopy::mydir/mycpy export COBCPY
causes the Compiler to search for a copyfile in /usr/group/sharedcopy, then in the current directory and finally in . /mydir/mycpy until either the copyfile is found or it can be considered not found.
UNIX:
On the Object COBOL system for UNIX, this environment vaiable is provided
for backward compatibility, and controls whether control codes are passed
transparently to the terminal.
COBCTRLCHAR="value" export COBCTRLCHAR
value |
Can be set to Y or N. If Y, control codes are passed transparently to the terminal. |
COBCTRLCHAR =Y export COBCTRLCHAR
See the chapter Adis in your Programmer's Guide to Creating User Interfaces for more information on the COBCTRLCHAR environment variable.
Specifies the directory, or directories that the run-time system is to search for data files. Provides you with the facility to map data files globally, thus enabling you to put working data files in a directory whose name is not known until run time.
COBDATA=path-name[:path-name]... export COBDATA
path-name |
A directory that the run-time system is to search when
looking for application data-files. When more than one path-name is
present, a null path-name represents the current
working directory.
|
COBDATA=:demo:/usr/data:progs export COBDATA
causes COBDATA to be set to instruct the run-time system to search for data files in the current directory, then in the directory . /demo, then in the directory /usr/data and finally in . /progs.
COBDATA affects the compiler and other utilities. During compilation, for example, program source is regarded as a data file by the compiler. If you intend to use any COBOL development system utilities, Micro Focus recommends that the COBDATA value starts with a colon (:).
COBDATA is considered set if there is an environment variable of this name in your environment space, and its value is non-empty.
The full mapping order for files is:
For multiple directory paths specified either in the COBDATA environment variable or a dd_ environment variable, the system searches the first directory specified followed by a slash (/) as a prefix to the user name.
If the filename is not found, or is not readable, the search continues with the next directory until the final directory has been searched. If no file is found, the first directory is used if a file is to be created.
Any dd_ and COBDATA mappings is ignored for any filename that starts with a hyphen (-) or a slash (/). In addition, it is illegal to have a hyphen in an environment variable name.
When using this facility, you should not use a filename that starts with "COB... "(these are reserved for the COBOL system).
You can use the COBDATA environment variable for files open in any mode (including OUTPUT) and for fixed or variable length files. If you are using indexed files, both the data and index files are in the same directory.
The COBDATA environment variable affects file deletes, using the rules given here, as well as file opens.
If you intend to use COBOL development system programs, we recommend that you first unset COBDATA, as many of these programs open data files and are thus affected by the value of COBDATA.
If you do need to use COBDATA, you should add :$COBDIR/tbox.lbr to the start of the COBDATA path.
Specifies the directory where the required Micro Focus COBOL system is installed. Many of the COBOL system components and utilities require and use this information. If the COBDIR environment variable is not set then the COBOL system acts as if it had been set to the default COBOL system directory. This default directory is /opt/lib/cobol on UNIX SVR4-base systesms, otherwise /usr/lib/cobol.
COBDIR=path-name export COBDIR
path-name |
The directory that contains the required Micro Focus COBOL system software. |
COBDIR=/cob41u1 export COBDIR
This causes cob to search the directory /cob41u1 for the Micro Focus COBOL system software.
The Micro Focus COBOL system is normally installed in the default COBOL system directory (see above) and so does not require COBDIR to be set. COBDIR only needs to be set when your COBOL system has been installed in a different directory such as when more than one version of the COBOL system is available at the same time.
Specifies the directory that Animator is to search for the information (.idy) file for the program being animated if it is not found in the same directory as the intermediate code (.int) file. Animator can update the information file to record information held between sessions. There is also a Compiler directive COBIDY, see the chapter Directives for Compiler for details.
COBIDY=path-name export COBIDY
path-name |
The directory that Animator is to search. |
Specifies that fixed length sequential files are buffered.
COBEXTFHBUF=buffer-size export COBEXTFHBUF
buffer-size |
The buffer-size in bytes. |
Specifies the directories in which Micro Focus format help files can be found. These files have the extension .hnf.
COBHNF=path-name[:path-name]... export COBHNF
path-name |
The directory that contains the .hnf files. |
COBHNF=/myhelp export COBHNF
This causes the On-Line Help System to search the directory /myhelp for the .hnf files.
For more details, see the chapter On-Line Help System in your Programmer's Guide to Creating User Interfaces.
Specifies the maximum elapsed time, in tenths of a second, for the connected terminal to transmit any valid escape sequence to the run-time system.
When a terminal key is depressed, the terminal might send in response a single character or a group of characters to the run-time system. Typically, such a group of characters starts with an escape character and the group of characters is known as an escape sequence. A terminal might send an escape sequence for one depression of a function key. It might also send the same sequence of characters for a depression of the Escape key followed by the depression of one or more alphabetic or numeric data keys. The only difference apparent to the run-time system is the interval between the arrival of each character; the user cannot type as fast as the escape sequence is generated by the terminal.
If a terminal is connected over a network that sends the characters to the run-time system in discrete packets, then the network can alter the intervals between each character arriving at the run-time system. COBKEYTIMEOUT is available to help compensate for typical network delays so the run-time system identifies escape sequences correctly.
COBKEYTIMEOUT=n export COBKEYTIMEOUT
n |
A number in the range 1 - 126 that represents the
maximum elapsed time required for a terminal to transmit any valid
escape sequence to the run-time system over the line or network
connection. On encountering a lone Escape character, the
run-time system waits n tenths of a second before
assuming that the character does not introduce an escape sequence. The
run-time system calculates an appropriate default value for n
from the baud rate of the terminal. |
Specifies the line numbers on the logical page associated with printer
channels referenced in a COBOL program via function names C01 through C12.
The appropriate control sequences are generated at run-time in response to
statements such as WRITE record
AFTER ADVANCING C01.
See the section The Special-Names Paragraph in your Language
Reference for details on the use of function names.
COBLPFORM=n[:n]... export COBLPFORM
n |
The line number, range 1 - 999, on the logical page
associated with a printer channel. If n is not
present, a value of 1 is assumed. The first n is
associated with channel C01, the second with C02 and so on up to the
limit of C12. Channels that have the logical line number set to 0,
mnemonics S01, S02, or CSP, or are undefined, are set to line 1, that is
to the beginning of the page. |
COBLPFORM=:3::::::::::60 export COBLPFORM
This sets channel 2 to logical line 3, and channel 12 to logical line 60. All other channels are set to logical line 1 by default.
Specifies user default options to the cob utility. COBOPT can either contain options that supplement or override the system default options defined in $COBDIR/cobopt, or it can specify the path of a file that contains such options. The options can extend over more than one line and each line must have the same format as described for the file $COBDIR/cobopt in the chapter COBOL System Interface (cob).
COBOPT="[set environment-variable=value] [options] ... [cobextn: .ext [.ext] ... ]" export COBOPT
or:
COBOPT=[path-name/]filename export COBOPT
environment-variable |
Any one of the environment variables supported by the COBOL system and listed in this appendix. |
value |
The value to which you want to set the specified environment variable. |
options |
One or more cob options. See the section Specifying cob Options in the chapter COBOL System Interface (cob) for details on the format of cob options. |
.ext |
A filename extension that, in addition to
the standard ones of .cob, .CBL, or .cbl,
denotes a file that cob should treat as a COBOL source file. The
extension must begin with a period, and if more than one is specified on
one line then they must be separated by a space or tab character. You
can use more than one cobextn line. |
If a line does not begin with one of the identifiers set
or cobextn:
then it is taken as an options
line.
path-name |
The directory that the COBOL system is to search for an options file. |
filename |
The name of a file containing cob options. |
COBOPT="-C ANS85 set COBCPY=$COBDIR/srclib/:$HOME/mylib:" export COBOPT
This enables ANSI'85 standard COBOL syntax and sets COBCPY to the specified list of paths.
COBOPT=temp/options
Specifies that cob options are contained in the file options in the directory temp.
Specifies the directory or directories that the run-time system is to search for dynamically loadable program (.int or .gnt) files.
COBPATH=path-name[:path-name]... export COBPATH
path-name |
The directory that the run-time system is to search
for a dynamically loadable program (.int or .gnt) file.
When more than path-name is specified, a null path-name
represents the current working directory. |
COBPATH=/u:/v:/qa/srclib:qa/otherlib export COBPATH
Specifies the name of a print spooler that is to receive, via its standard input stream (stdin), output from any DISPLAY UPON PRINTER statement.
COBPRINTER=command-line export COBPRINTER
command-line |
A command line supported by your system and that can be executed by the system shell. Typically, it is simply the name of a print spooler or other executable, but if the shell is escaped when setting the value then any command-line arguments can be used. |
COBPRINTER="myspooler -a $TMP/spoolfile" export COBPRINTER
Each DISPLAY UPON PRINTER statement executed by your COBOL program
causes a new invocation of command-line
. Each
invocation receives the data referenced in the DISPLAY statement, and is
followed by a system end-of-file condition.
Specifies run-time system switch settings for the run-time system to observe when running an application.
export COBSW
|
Enables (+) or disables (-) the following switch. |
switch |
One of the switches described in the chapter Descriptions of Run-time Switches. |
COBSW=+0+D export COBSW
This enables run-time switch 0 and the ANSI COBOL debug switch.
Specifies the directory or directories to be searched by the run-time system for a terminfo database of terminal information tailored to the needs of COBOL applications. This enables COBOL applications to use different terminfo settings to those used by non-COBOL applications, such as vi, when using the same terminal.
COBTERMINFO=path-name[:path-name]... export COBTERMINFO
path-name
|
A directory that identifies a terminfo database that
contains terminal settings tailored for COBOL applications. A null
path-name represents the current working
directory. |
The COBOL system takes the value of the standard UNIX environment variable TERM as the name of the terminal in use. It uses this to search for the appropriate terminal information in a terminfo database. The run-time system first searches the databases identified in COBTERMINFO and then, if the terminal information is not found it searches the database identified in the standard UNIX environment variable TERMINFO.
If COBTERMINFO is not set, the run-time system acts as if it had been set to $COBDIR/terminfo.
Micro Focus recommends that the first directory listed in COBTERMINFO is $COBDIR/terminfo so the terminfo database supplied with this COBOL system is found first. This contains, for commonly used terminals, terminfo settings that are fuller and more appropriate to COBOL than those normally available in the UNIX system terminfo database.
COBTERMINFO can also be used to identify a terminfo database that is portable between UNIX systems. Such a database conforms to the standard UNIX database format but does not include any supplementary, UNIX implementation-dependent terminal information. Many UNIX system terminfo databases are not portable because they include such supplementary information. The COBOL system ignores any such non-portable details. See the chapter Device Handling and Terminfo for further details on using the terminfo database.
TERM, TERMINFO
Specifies the column width of the terminal screen or window, overriding the specified terminals default.
COLUMNS=n export COLUMNS
n |
The width of the terminal screen or window, in column positions. |
COLUMNS=100 export COLUMNS
The default, when COLUMNS is unset or null, is to use the cols value as defined in the specified terminals terminfo entry. See the chapter Device Handling and Terminfo for further details on using the terminfo database. The Terminal type is specified via the standard UNIX environment variable, TERM.
On non-windowing environments, where the terminal screen area cannot be resized, the COLUMNS values does not need to be set. Terminals that can switch into a Wide mode (usually from 80 to 132 columns) have a terminal name ending in "-w" and these are automatically supported, without the need to set COLUMNS. For more information, see the Device Handling and Terminfo chapter.
In windowing environments, where the size of windows can be changed, the cols value in terminfo can become inaccurate when a window is resized.
If you want to use the full width of the window then set COLUMNS to the current column width of the window.
Using COLUMNS values that do not correspond to the actual width of the window produces unexpected results.
Most system software, for example tbox, does not function correctly using widths of more or less than 80 columns. Adis functions correctly with any screen size.
TERM, LINES
Specifies a configuration file to be used by the Callable File Handler.
EXTFH=filename.cfg export EXTFH
filename.cfg | The name of the configuration file |
EXTFH=/myconfig.cfg export EXTFH
See the chapter Callable File Handler (ExtFH) in your Programmer's Guide to File Handling for more details.
Specifies a configuration file to be used by the Fileshare Client.
FHREDIR=filename.cfg export FHREDIR
filename.cfg | The name of the configuration file |
FHREDIR=/myconfig.cfg export FHREDIR
See the chapter Fileshare in your Programmer's Guide to File Handling for more details.
Specifies a configuration file to be used by the Fileshare Server.
FS=filename.cfg export FS
filename.cfg | The name of the configuration file |
FS=myconfig.cfg export FS
See the chapter Fileshare in your Programmer's Guide to File Handling for more details.
Specifies that the Fileshare System is to run in single user mode.
FSCOMMS="\$local" export FSCOMMS
"\$local" | Run the Fileshare System in single user mode. |
See the chapter Fileshare in your Programmer's Guide to File Handling for more details.
Defines the locale.
LANG=language[_territory[.codepage]] export LANG
language | The language in which you program is to run. |
_ (underscore) | The delimiter for language and territory, if territory is specified. |
territory | The country in which you program is to run. |
. (period) | The delimiter for territory and codepage, if codepage is specified. |
codepage | The character set to use for your program. |
LANG=fr_FR export LANG
For a full description of this environment variable, see the chapter Internationalization Support in your Programmer's Guide to Writing Programs
Specifies the directory or directories for the UNIX system, cob and the run-time system to search for shared libraries. It is only available on certain UNIX systems and is required when developing or running an application that is dynamically linked or uses shared libraries, or when running any COBOL system utility that is installed as using shared libraries.
LD_LIBRARY_PATH=path-name[:path-name]... export LD_LIBRARY_PATH
path-name |
A directory to search for shared libraries. |
The list of directories should include $COBDIR/coblib. The COBDIR environment variable is described earlier in this appendix.
This environment variable is a system environment variable, so see you UNIX documentation for more information.
COBDIR, SHLIB_PATH, LIBPATH
The COBOL system file $COBDIR/coblib/liblist contains the list of libraries to be used by the cob utility when it produces executable program files. LIBLIST specifies an alternative file for cob to use and should not normally be used unless directed to by your Technical Support representative.
LIBLIST=path-name export LIBLIST
path-name |
The full path-name of the alternate file containing the user default library list to be used instead of $COBDIR/coblib/liblist. |
The liblist file specifies which libraries to use for different passes of the system linker. For details on the format and function of this file, see the default liblist file supplied with your COBOL system software in the directory $COBDIR/coblib.
Specifies the directory or directories for the UNIX system, cob and the run-time system to search for dynamically lined programs or shared libraries. It is only available on AIX-based systems and is required when developing or running an application that is dynamically linked or uses shared libraries, or when running any COBOL system utility that is installed as using shared libraries.
LIBPATH=path-name[:path-name]... export LIBPATH
path-name |
A directory to search for shared libraries. |
The list of directories should include $COBDIR/coblib. The COBDIR environment variable is described earlier in this appendix. See the AIX documentation for more information.
LIBPATH=$COBDIR/coblib:/lib:/usr/lib
COBLIB, LD_LIBRARY_PATH, SHLIB_PATH
Specifies the depth of the terminal screen or window, overriding the specified terminals default.
LINES=n export LINES
n |
The depth of the terminal screen or window, in lines. |
LINES=50 export LINES
The default, when LINES is unset or null, is to use the lines value as defined in the specified terminal's terminfo entry. See the chapter Device Handling and Terminfo for further details on using the terminfo database. The terminal type is specified via the standard UNIX environment variable, TERM.
On non-windowing environments, where the terminal screen area can not be resized, the LINES values does not need to be set.
In windowing environments, where the size of windows can be changed, thelines value in terminfo can become inaccurate when a window is resized.
If you want to use the full depth of the window then set LINES to the current depth of the window.
Using LINES values that do not correspond to the actual depth of the window produces unexpected results.
TERM, COLUMNS
Specifies the path on which the mapper file exists.
MFEXTMAP=pathname export MFEXTMAP
pathname | The pathname of the path on which the External File Mapper mapper file exists. |
MFEXTMAP=/configdir/mapconfigs export MFEXTMAP
See the chapter File Naming in your Programmer's Guide to File Handling for more details.
Specifies the directory or directories for the UNIX system, cob and the run-time system to search for shared libraries. It is only available on HP/UX systems and is required when developing or running an application that is dynamically linked or uses shared libraries or when running any COBOL system utility that is installed as using shared libraries.
SHLIB_PATH=path-name[:path-name]... export LIBPATH
path-name |
A directory to search for shared libraries. |
The list of directories should include $COBDIR/coblib. The COBDIR environment variable is described earlier in this appendix.
See your HP/UX documentation for more information.
COBDIR, LD_LIBRARY_PATH, LIBPATH
Defines the type of terminal being used.
TERM=name export TERM
name |
The name of the terminal in the terminfo database. |
TERM=at386 export TERM
COBTERMINFO, TERMINFO, LINES, COLUMNS, Terminfo Database and Terminal Devices
Specifies the directory to be searched by all UNIX programs, including the run-time system, for the UNIX system terminfo database.
TERMINFO=path-name export TERMINFO
path-name
|
The name of a directory that contains the UNIX system terminfo database. |
The UNIX system terminfo database is used by all UNIX applications that need to use a terminal. However, COBOL applications tend to make much fuller and sophisticated use of the terminal and require a fuller terminfo description than is required by typical UNIX applications such as vi. Some terminal capabilities, such as those set during the initialization of the terminal to control the use of function keys, commonly conflict with the needs of typical COBOL applications. In such cases, the terminal information required by COBOL can be stored in a separate terminfo database and referenced using COBTERMINFO as described earlier in this appendix.
COBTERMINFO, TERM, Terminfo Database and Terminal Devices
Specifies a directory in which to store temporary files in place of the UNIX system default.
TMPDIR=path-name export TMPDIR
path-name |
The directory used by UNIX applications for any temporary work files. Temporary work files can be created by COBOL utilities such as cob or by the run-time system when it support statements such as SORT. If you do not specify a directory, the system default directory is used. |
You might need to use this environment variable if the run-time system needs to page data to disk when creating heaps or sorting.
Enables the Callable File Handler's trace facility.
XFHTRACE={ALL|xfhtrace.cfg export XFHTRACE
ALL |
Traces all file input and output operations for all files. |
xfhtrace.cfg |
The trace facility uses this configuration file to select files to be traced. |
XFHTRACE=xfhtrace.cfg export XFHTRACE
Only those files specified in the file xfhtrace.cfg will be traced.
For details on the format of the xfhtrace.cfg file, see the chapter Callable File Handler in your Programmer's Guide to File Handling.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Terminfo Database and Terminal Devices | Compiling CGI Programs Created on NetExpress |