HP 3000 Manuals

Ap I. Environment Variables [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Operating Guide for the Series 700 and 800

Appendix I  Environment Variables 

Environment Variables 

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:

CCITCP2                Specifies TCP/IP location

COBAIF                 Specifies destination of Animator session
                       information

COBANIMOPT             Specifies directives in Animator

COBATTR                Highlights text

COBCONFIG              Tailors Run-Time configurables

COBCPY                 Searches for COPY files

COBDATA                Maps data files

COBDIR                 Searches for system software

COBIDY                 Searches for information files

COBKEYTIMEOUT          Determines timeout between keys

COBLPFORM              Writes to printer channels

COBNOFED               Determines presence of field editor driver

COBOPT                 Overrides system options

COBPATH                Locates programs for dynamic loading

COBPRINTER             Directs output to a printer

COBSW                  Sets switches when executing cob files

COBTERMINFO            Searches multiple paths for machine's terminal
                       database

LD_LIBRARY_PATH        Searches for shared libraries

TERMINFO               Searches for machine's terminal database

TMPDIR                 Stores temporary files

Full details on all these environment variables can be found in the main
body of this manual.  dd_ routines provide an alternative method of
assigning environment variables.  These are detailed in Chapter 12 ,
COBOL File Handling.

CCITCP2 

CCITCP2 specifies the location of the TCP/IP cooperative process
registration program.  It is associated with the Common Communications
Interface (CCITCP). See your Toolbox Operating Guide for details.

Syntax: 

CCITCP2=machine-name

Parameters: 

machine-name         is the location of TCP/IP, as listed in the TCP/IP
                     hosts file.

COBAIF 

COBAIF specifies where to load and save Animator session information.
See Appendix F , Directives for Animator for details of the COBAIF
Animator directive.

Syntax: 

COBAIF=path-name

Parameters: 

path-name            is the location of the Animator information file.

COBANIMOPT 

COBANIMOPT specifies directives when invoking Animator.

Syntax: 

     COBANIMOPT=directive
     export COBANIMOPT

Parameters: 

directive            must not be a file-name.

When you invoke Animator, it will first read the directives you have
specified in COBANIMOPT and then use any directives you specify in the
command line (which may override some of the directives you set in
COBANIMOPT). For details on the format for specifying directives, see
Chapter 4 , Animating.

Example 

     COBANIMOPT=NOSCREENPAGE
     export COBANIMOPT

COBATTR 

COBATTR changes the behavior of the high and low intensity attributes to
determine if text appears highlighted on your screen or not.

Syntax: 

COBATTR=n

Parameters: 

n       takes the values 0 to 3 as follows:

        0       the default.  Highlighted text appears in high intensity
                mode for terminals which support a high intensity
                attribute but no low intensity attribute, or in normal
                mode for terminals which support low intensity mode as
                the default mode for un-highlighted text.

        1       highlighted text always appears in high intensity mode.
                Low intensity mode is never used.

        2       high and low intensity space characters are not assumed
                to be the same as normal mode space characters.

        3       as for 1 and 2 above.

High and low intensity modes are as described in terminfo.  See Chapter
22 , Device Handling and Terminfo for details.

Example 

     COBATTR=1

COBCONFIG 

COBCONFIG points to your own Run-Time configuration file if you decide to
tailor any Run-Time configurables to suit your own needs.

Syntax: 

COBCONFIG=path-name

Parameters: 

path-name            is the name of your configuration file.

COBCPY 

COBCPY specifies the directory the compiler and Animator are to search
for COPY files.

Syntax: 

COBCPY=path-name-list

Parameters: 

path-name-list       specifies the paths, separated by colons, that the
                     compiler and Animator are to search.

Example 

     COBCPY="/usr/group/sharedcopy:/usr/mydir/mycpy"

COBDATA 

COBDATA provides you with the facility to map data files on a global
basis, thus allowing you to place working data files in a directory whose
name is not known until run time.  COBDATA is considered to be set if
there is an environment variable of this name in your environment space,
and its value is non-empty.

If you specify an empty directory this is taken to mean the current
directory and is equivalent to specifying a period (.).

The full mapping order for files is:

   1.  Any dd_ or COBCAP environment mappings

   2.  Any ASSIGN TO EXTERNAL mappings

   3.  Any COBDATA environment mappings

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 file-name 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.

The COBDATA value string must begin with a colon (:)  or your compilation
will not work.  dd_ and COBDATA mappings will be ignored for any
file-name which starts with a hyphen (-) or a slash (/).  In addition, it
is illegal to have a hyphen anywhere within an environment variable name.

When using this facility, you should not use a file-name 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 will be 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.

Syntax: 

     COBDATA=:directory:directory
     export COBDATA

Parameters: 

directory            is the name of the directory to which you wish
                     COBDATA to point.

Example 

     COBDATA=:demo:usr:progs
     export COBDATA

COBDIR 

The Micro Focus COBOL system software is located in a default file, and
that is where cob normally expects to find it.  See Chapter 2 , COBOL 
System Interface for details on locating the system software.  If you
install this in a different directory, COBDIR allows you to specify which
directory that is, thus forcing cob to search the specified directory for
the system software instead of the default directory.

Syntax: 

COBDIR=directory

Parameters: 

directory            is the directory which contains the Micro Focus
                     COBOL system software.

Example 

     COBDIR=/cob32u1
     export COBDIR

This causes cob to search the directory /cob32u1 for the Micro Focus
COBOL system software.

COBIDY 

COBIDY directs Animator to look for its information files (.idy) in a
particular location if they are not found in the same directory as the
program being animated.

Syntax: 

COBIDY=path-name

Parameters: 

path-name            is the path where the Animator information file is
                     to be written.

If you do not specify a path-name, the path-name in the COBIDY
environment variable is used; if the environment variable contains
multiple path-names, the first of them is used.  With NOCOBIDY, the .idy
file is written to the same path as the object program.

COBKEYTIMEOUT 

COBKEYTIMEOUT specifies the length of time, in hundredths of a second,
that your machine is to wait between receiving an Escape character and
any other keystroke, before assuming that the Escape character is to be
treated as a single character and not as a function key.  This is
particularly useful if you are using a remote terminal, where there may
be some delay between keystrokes reaching your machine.

Syntax: 

COBKEYTIMEOUT=n
export COBKEYTIMEOUT

Parameters: 

n              is the number of hundredths of a second, in the range 0 -
               126, that your machine is to wait between receiving an
               Escape character and any other keystroke.

COBLPFORM 

The Micro Focus COBOL system emulates printer channels C01 through C12 by
line feeds and form feeds.  COBLPFORM allows you to define the line
numbers on the form, thus enabling you to write to these printer
channels.

Syntax: 

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

Parameters: 

n              are digits which specify the line number you require for
               the relevant channel.  Note that any channels which have
               either line number 0, mnemonics S01, S02, or CSP, or are
               undefined, are set to line 1, that is to the beginning of
               the page.

Example 

     COBLPFORM="1:::::::::::60"

This sets channel 1 to line 1, and channel 12 to line 60.

COBNOFED 

COBNOFED determines whether or not the field editor driver will be
present.

Syntax: 

COBNOFED=value

Parameters: 

value                is y or Y or any other keystroke.  If set to y or Y,
                     the field editor driver will not be present.  If set
                     to any other keystroke, you will have ADIS.

COBOPT 

COBOPT can either contain options which supplement or override the
system-wide default Compiler and Native Code Generator options as defined
in the file $COBDIR/cobopt, or it can specify the path of a file which
contains such options.  If you use COBOPT to point to such a file, this
file must be in the same format as $COBDIR/cobopt.  See Chapter 2 ,
COBOL System Interface for details.

Syntax: 

     COBOPT="[SET environment-variable=value...]
     [any-cob-command-line-option]"

Parameters: 

environment-variable  is any environment variable supported by your Micro
                      Focus COBOL system.

value                 is the value to which you wish to set the specified
                      environment variable.

Example 

     COBOPT="-C ANS85
     SET COBCPY=$COBDIR/srclib:$HOME/mylib::"

This enables ANSI '85 standard COBOL syntax and sets COBCPY to the
specified path.

COBPATH 

COBPATH specifies the directories the RTS is to search for a specified
file when trying to locate a program for dynamic loading.

Syntax: 

COBPATH=[:] path-name [:path-name]...

Parameters: 

the initial colon    indicates that the current directory is to be
(:)                  searched first.

path-name            specifies the directories and their paths which the
                     RTS is to search.

Example 

     COBPATH=/u:/v:/qa/srclib:qa/otherlib

COBPRINTER 

COBPRINTER specifies the name of the printer to which the output from a
DISPLAY UPON PRINTER statement is to be directed.

Syntax: 

COBPRINTER=printer-name

Parameters: 

printer-name         can be the name of any printer supported by your
                     system.

COBSW 

COBSW sets various switches when you execute files output by cob.

Syntax: 

COBSW={+}switch
      {-}

Parameters: 

{+} enables or disables the specified switch.
{-}

switch        has one or more of the following values:

0 to 8  -  run - time switches
     A  -  ANIMATOR switch
     B  -  Skip Locked Record switch
     d  -  Dynamic Paging Buffer switch
     D  -  Standard ANSI COBOL debug switch
     e  -  COBOL Symbol switch
     E  -  Error Switch
     F  -  Compatibility Check switch
     i  -  Keyboard interrupt switch
     I  -  Memory switch
     K  -  Indexed files sequence check switch
     N  -  Null switch
     p  -  Dynamic Linkage Fixup switch
     Q  -  File Status Error switch
     s  -  Sort Memory switch
     S  -  SORT switch
     T  -  TAB switch

All of these switches are described in detail in Appendix E ,
Descriptions of Run-Time Switches.

Example 

     COBSW=+0+D

This enables run-time switch 0 and the ANSI COBOL debug switch.

COBTERMINFO 

COBTERMINFO specifies a list of paths to search for your machine's
terminal database.

Syntax: 

COBTERMINFO=[:]path-name [:path-name]...

Parameters: 

path-name            is a list of the directories in which to search for
                     your machine's terminal database.  We recommend that
                     you give COBTERMINFO the default setting of
                     $COBDIR/terminfo, so that the Micro Focus supplied
                     terminfos are searched before the system supplied
                     ones.

LD_LIBRARY_PATH 

LD_LIBRARY_PATH specifies where to look for shared libraries.

Syntax: 

LD_LIBRARY_PATH=[:]path-name [:path-name]...

Parameters: 

the initial colon    indicates that the current directory is to be
(:)                  searched first

path-name            specifies where to search for shared libraries.
                     This variable should be set to (or should include)
                     COBDIR/coblib, where COBDIR is the value of the
                     environment variable COBDIR (see earlier in this
                     appendix).

TERMINFO 

TERMINFO specifies the path to search for your machine's terminal
database.

Syntax: 

TERMINFO=path-name

Parameters: 

path-name            is the name of the directory in which to search for
                     your machine's terminal database.

TMPDIR 

TMPDIR enables you to set a different drive or path in which to store
temporary files.

Syntax: 

TMPDIR=directory

Parameters: 

directory            is the location used by SORT for its temporary work
                     files.  If you do not specify a directory, the
                     system default directory will be used.



MPE/iX 5.0 Documentation