Some aspects of alfred can be controlled with configuration variables. Like other ACUCOBOL-GT configuration variables, alfred configuration variables can be included in your regular configuration file, or in a separate configuration file, or they can be set in the environment. By default, when ACUCOBOL-GT is installed, alfred is set up to use a unique configuration file, named "alfred.cfg", located in the "tools" subdirectory. To use another configuration file, name the file with the "-C" option when you start alfred. Or, if you start alfred with the program icon you'll need to redefine the icon's COMMAND LINE property (the TARGET field of the SHORTCUT property page in Windows 95/98) to specify the name and location of the configuration file that you want to use. The default COMMAND LINE property definition is:
c:\ACUCBL32\BIN\wruncbl -C ..\tools\alfred.cfg alfred
The specification of alfred configuration variables conforms to the same format and usage rules that apply to all other ACUCOBOL-GT runtime configuration variables (see Appendix H in Book 4, Appendices).
alfred's specific configuration variables include:
ALFRED-MESSAGE-FILE Holds the path and name of the alfred message file.
Variables to control color: The following eight variables allow you to customize some of the color and video attributes that alfred uses to display select program and record elements. The default value of each is given after the variable name.
ALFRED-LABEL-COLOR
| low cyan
|
ALFRED-ENTRY-COLOR
| low cyan
|
ALFRED-BANNER-LABEL-COLOR
| low green
|
ALFRED-BANNER-TEXT-COLOR
| low green
|
ALFRED-HIGHLIGHT-COLOR
| low green
|
ALFRED-DISABLED-COLOR
| low cyan
|
ALFRED-HELP-COLOR
| low green
|
ALFRED-KEY-COLOR
| high red
|
underline high red on black
or you can set it to:
12325
Color
| Foreground
| Background
|
Black
| 1
| 32
|
Blue
| 2
| 64
|
Green
| 3
| 96
|
Cyan
| 4
| 128
|
Red
| 5
| 160
|
Magenta
| 6
| 192
|
Brown
| 7
| 224
|
White
| 8
| 256 |
Value
| Video Attribute
|
1024
| Reverse video
|
2048
| Low intensity
|
4096
| High intensity
|
8192
| Underline
|
16384
| Blink
|
32768
| Protected
|
65536
| Background low-intensity
|
131072
| Background high-intensity |
See Chapter 9, "Color Mapping", in Book 2, User Interface Programming for a discussion of the configuration and control of color.
ALFRED-ENTRY-FIELDS This variable controls whether a box is placed around the entry field created for each field of a record. Note that entry fields are used only when you are editing a file that has an XFD (otherwise entry fields are not used). The default setting is BOXED, which indicates to place a box around all entry fields. If any other value is given, entry fields are not boxed.
ALFRED-TOOLS-FILE This variable holds the path and name of the bitmap file to use with the alfred toolbar. It is predefined to point to the standard toolbar bitmap file in "..\tools\alftools.bmp". If you want to substitute your own toolbar icons, simply redefine this variable to hold the path and name of your bitmap file. The file must contain at least six bitmaps. If this variable is blank, or if alfred cannot open the named file, or it does not contain bitmap data, the toolbar will use text buttons.
Toolbar bitmap variables: The following six variables allow you to specify which bitmap (in the bitmap file) to use with a given button.
ALFRED-INPUT-BITMAP
| 1
|
ALFRED-IO-BITMAP
| 2
|
ALFRED-PG-DN-BITMAP
| 3
|
ALFRED-PG-UP-BITMAP
| 4
|
ALFRED-PREV-REC-BITMAP
| 5
|
ALFRED-NEXT-REC-BITMAP
| 6 |
ALFRED-BITMAP-FILE This variable holds the path and name of the "alfred by Acucorp" bitmap.
ALFRED-GET-PRINTER This variable holds the name of a COBOL program that returns information about the printer. alfred calls the named program with a single USING argument. The program should return the name of the printer to be used and the number of lines allowed per page. You must provide the COBOL program. The group item that is passed is defined in the file "alfred.ws" located in the ACUCOBOL-GT installation subdirectory "tools". It is currently defined as follows:
01 alfred-get-printer-group. 03 printer-name pic x(80) 03 lines-per-page pic 999.
ALFRED-PRINTER-NAME This variable holds the name of the printer to use. Its value is used if ALFRED-GET-PRINTER is undefined or does not return a valid printer name. Note that if ALFRED-GET-PRINTER does not return a printer name and this variable is undefined, alfred will attempt to use "-P SPOOLER".
Print header variables These variables are used to configure up to nine print headers. It is expected that header definitions will frequently consist largely of text; however there is a set of codes that can be used to insert dynamic information, such as the date or time. Each code must be preceded with the percent character ("%"), followed by a code letter.
Code letter
| Number of characters used
|
Meaning
|
m
| 2
| month (01 - 12)
|
y
| 2
| year
|
c
| 2
| century
|
d
| 2
| day of month (01 - 31)
|
D
| 10
| full date (equivalent to %c%y/%m/%d)
|
H
| 2
| hour (01 - 24)
|
M
| 2
| minute (00 - 59)
|
S
| 2
| second (00 - 59)
|
T
| 8
| full time (equivalent to %H:%M:%S)
|
a
| 3
| abbreviated weekday (Sun, Mon, Tue, etc.)
|
h
| 3
| abbreviated month (Jan, Feb, Mar, etc.)
|
r
| 10
| full time, 12 hour, with AM or PM as necessary
|
p
| 3
| page number
|
f
| 80
| file name |
ALFRED-PRINT-HEADER-1
ALFRED-PRINT-HEADER-2
ALFRED-PRINT-HEADER-3
ALFRED-PRINT-HEADER-4
ALFRED-PRINT-HEADER-5
ALFRED-PRINT-HEADER-6
ALFRED-PRINT-HEADER-7
ALFRED-PRINT-HEADER-8
ALFRED-PRINT-HEADER-9