HP 3000 Manuals

Operation [ Micro Focus COBOL for UNIX, Getting Started ] MPE/iX 5.0 Documentation


Micro Focus COBOL for UNIX, Getting Started

Operation 

When a tool starts it reads its configuration information from both the
global and local configuration files.  The configuration details are
stored in the configuration files under headings called tags.  Under each
tag are lines containing configuration details for each tool.  A tool
usually reads details from more than one tag.

DOS, Windows, and   On DOS, Windows, and OS/2, see the chapter
OS/2                Application Configuration System in your Toolset 
                    Reference for details of the format.

UNIX                On UNIX, see the chapter Application Configuration
                    System in your Toolbox Reference for full details of
                    the format.

                    The options stored in the local configuration file
                    override those in the global one.

                    The global configuration file holds default
                    configuration details and the local one holds
                    differences from the defaults for a particular user.
                    This enables defaults to be updated centrally and
                    immediately affect all users, while still providing
                    for individual preferences.

Example 

As an example, let's look at how you change the colors used by the
character mode interface.  This, in fact, affects many tools, but the
principle is the same as for a feature used by an individual tool.

In the global configuration file are the following tag and configuration
details:

     [MF-ATTRIBUTES]
     SYS-ATT-01 : BLACK ON BLACK
     SYS-ATT-02 : YELLOW ON RED
     SYS-ATT-03 : BROWN ON BLACK
     SYS-ATT-04 : YELLOW ON BLACK
     SYS-ATT-05 : CYAN ON BLACK
     SYS-ATT-06 : WHITE ON BLACK
     .
     .
     .

The word before -ATTRIBUTES is called the prefix and is the name of the
tool.  In this case it is MF- because this feature affect many tools.
They read this to determine the colors to use on the screen.

The tags and details used to configure a tool are described in the
documentation for each tool.  Look there for information on the syntax
used in a tool's configuration details.

Suppose you want to change the menus to have a black background with
green text.  You need to find out which SYS-ATT- line specifies the menu
colors.  Because color affects many tools, information on configuring
color is not in a chapter for a specific tool.

DOS, Windows, and   On DOS, Windows, and OS/2, it is in the chapter Color 
OS/2                in your Toolset Reference.

UNIX                On UNIX, it is in the chapter Application 
                    Configuration System in your Toolbox Reference.

                    From that chapter you find that the menu-text color
                    is SYS-ATT. If you are a system administrator in a
                    network or multi-user environment you change the
                    installation-wide default colors by editing the
                    global configuration file.  Just change the entry to:

     SYS-ATT-03 : GREEN ON BLACK

                    If you want to make the change only for an individual
                    user you change the local configuration file, adding:

     [MF-ATTRIBUTES]
     SYS-ATT-03 : GREEN ON BLACK

                    Now, after a tool reads the colors from the global
                    configuration file, the menu color SYS-ATT-03 will be
                    overridden by the setting defined in the local
                    configuration file.

Overriding All Entries Under a Tag 

The example of color configuration above shows how you can override a
single item under a tag in the global configuration file by one line from
the local configuration file.

Some tools read all the lines under a tag only from either the local
configuration file or only from the global configuration file.  An
example of this is the tag [ANIM2-MENU], which describes the menu to be
presented by Animator Version 2.

If this tag exists in the local configuration file, Animator V2 reads the
menu information from that file only, and ignores any entries under
[ANIM2-MENU] in the global configuration file.

Software Modifying the Configuration Files 

Several tools (especially the graphical tools) can change their own
configuration while running.  They always save their current
configuration to the local configuration file only.  You can modify the
local configuration as above, but the software can change it too.  The
software must have read/write access to the file.

Names of the Configuration Files 

DOS, Windows, and   On DOS, Windows, and OS/2 the global configuration
OS/2                file is called mf.ini.  When you install the COBOL
                    system this file is put in one of the directories
                    pointed to by the environment variable COBDIR. The
                    local configuration file is called mfuser.ini.

                    When you install the COBOL system this file,
                    containing tags but no configuration details, is put
                    in one of the directories pointed to by the
                    environment variable COBDIR.

UNIX                On UNIX the global configuration file is called
                    mfcobolrc.  When you install the COBOL system this
                    file is put in the directory pointed to by the
                    environment variable COBDIR. The local configuration
                    file is called .mfcobolrc and the COBOL system always
                    looks for it in your home directory.

                    The COBOL system does not create this file.  To
                    change any local configuration details, create the
                    file $HOME/.mfcobolrc containing the details you
                    want.

Single User or Network 

DOS, Windows, and   This section and its subsections are only relevant on
OS/2                DOS, Windows and OS/2.

                    On DOS, Windows, or OS/2 you may be running as a
                    single user on a single machine, or with several
                    users on a network.  This section tells you where on
                    your system to put the configuration files.

On a Single-User Machine.   

On a single-user machine you are not sharing any configuration
information with other users, so the global configuration file is not
strictly needed.  You can keep both configuration files in the same
directory, pointed to by COBDIR. Make all changes to the local
configuration file.

On a Network.   

The global configuration file mf.ini should be on a read-only network
server drive.  Each user's local configuration file mfuser.ini should be
either that user's local disk or in that user's individual writeable work
area on a network drive.  Set COBDIR on each machine to point to both the
single global file and to the user's own local configuration file.

For example, suppose the COBOL system is in the directories x:\cobol\lbr  
and x:\cobol\exedll and that a user has a writeable work area on a
network server accessible as u:\user1.

Setup will have set COBDIR to:

cobdir=x:\cobol\lbr;x:\cobol\exedll 

You should update this to:

cobdir=u:\user1;x:\cobol\lbr;x:\cobol\exedll 

You should also copy the local configuration file mfuser.ini from the
x:\cobol\lbr directory into each user's work area and remove it from the
central location.

Upgrading From Earlier Releases 

In releases of this COBOL system before V3.2, each tool was configured by
its own .cfg file.  In many cases the tags and details in V3.2
configuration files are the same as in the .cfg files in previous
releases.  If you had an earlier release and you made any changes to .cfg 
files, you can copy these changes into the local configuration file under
the relevant tag.

The following table shows .cfg files no longer present at V3.2.

          DOS, Windows, and OS/2                               UNIX 

---------------------------------------------------------------------------------------

mfwb.cfg                                    tbox.cfg

dfed.cfg                                    cmenu.cfg

probe.cfg                                   editor.cfg

cmenu.cfg                                   MFTOOLS.CFG

editor.cfg

builder.cfg

cwsource.cfg

proco.cfg

mfpbf.cfg

mf.cfg

The names of the following tags have changed to show they are not
specific to a particular tool (prefix is the name of the tool):

               Pre-V3.2 Tag                                  V3.2 Tag 

---------------------------------------------------------------------------------------

prefix-ATTRIBUTES                           MF-ATTRIBUTES

prefix-TRACE                                MF-TRACE

prefix-SWITCHES                             MF-SWITCHES



MPE/iX 5.0 Documentation