Sample Session with Dialog System |
This chapter describes how you can configure the COBOL development tools, using configuration files.
It covers the location and organization of the configuration files, but does not give details of the specific configuration options. These are described in the chapters relevant to each tool.
This chapter is generic across several Micro Focus COBOL systems. Side headings show which text applies to your system.
You can configure many of the Micro Focus Development tools to modify their behavior or look and feel. The current configuration of a tool is held on disk so that it behaves the same whenever it is run.
The configuration is held in two files:
DOS, Windows and OS/2:
On DOS, Windows and OS/2 the two files are mf.ini and mfuser.ini
UNIX:
On UNIX the two files are mfcobolrc and .mfcobolrc
In both cases, the first is the global configuration file, and the second is the local configuration file.
These two files contain the configuration of many tools. To configure these tools you edit these two files, using any text editor.
Using two files enables the system to support a networked or multi-user environment. The global configuration file stores installation-wide defaults for the tools. The local configuration file for each user modifies these defaults without affecting any other user. This file must be in a writeable directory.
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.
See the chapter Application Configuration System in your Programmer's Guide to Writing Programs for 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.
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. It is in the
chapter Application Configuration System in your Programmer's
Guide to Writing Programs.
From that chapter you find that the menu-text color is SYS-ATT-03
.
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.
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.
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.
DOS, Windows and OS/2:
On DOS, Windows and OS/2 the global configuration 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.
DOS, Windows and OS/2:
This section and its subsections are relevant only on 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 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.
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.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Sample Session with Dialog System |