PreviousCharacter Set Support on UNIX Common Questions and AnswersNext

Chapter 17: Setting Up the Configuration File

There are various configuration defaults associated with the operation of Dialog System. You can change these defaults by editing the configuration file dsdef.cfg provided with your Dialog System software. The configuration file contains certain characters that might interfere with some editors; however, you can use the Micro Focus COBOL Editor to edit the configuration file.

This chapter explains how to configure the defaults associated with:

The first three categories of configuration parameters are relevant only to panel designers rather than end users.

17.1 The Configuration File dsdef.cfg

The configuration file, dsdef.cfg, is a standard ASCII text (line sequential) file that must exist in either the current directory or the directory indicated by the environment variable DSDIR . The current directory is searched first.

The configuration file contains the configuration parameters described in this chapter. A configuration parameter entry must be in upper case, and must start in column one of a line. Any other type of entry is treated as a comment.

Configuration parameters can be specified in any order.

17.2 Copyfile Defaults

The configuration file can contain parameters that perform the following options when the copyfile is generated:


Control Block Level-88s

The configuration parameter CONTROL BLOCK EIGHTY EIGHTS enables you to place level-88 constants in the following control block fields:

Syntax:
CONTROL BLOCK EIGHTY EIGHTS [YES|NO]
Default:
NO
Remarks:

This configuration parameter is provided only as a compatibility support for previous releases of Dialog System on DOS. Current releases, including the UNIX version, automatically generate these constants in the COBOL copyfile.


Data Block Level-88s

The configuration parameter DATA BLOCK FLAGS EIGHTY-EIGHTS causes level-88 items to be placed in all single-digit numeric fields in the generated copyfile. These level-88 items enable you to replace expressions by condition names that can be tested for TRUE, which improves the readability of source code.

Syntax:
DATA BLOCK FLAGS EIGHTY-EIGHTS  [YES|NO]
Default:
YES

ANSI or Micro Focus Constants

The configuration parameter CONTROL BLOCK MF-CONSTANTS causes Micro Focus style level-78 items to be placed in the following control block fields:

These level-78 items provide the definitions of constants that you can use in your program.

Syntax:
CONTROL BLOCK MF-CONSTANTS  [YES|NO]
Default:
NO
Remarks:

Level-78 items are not ANSI standard, so to use these preset values and remain in the ANSI standard, you must set the configuration parameter CONTROL BLOCK ANSI-CONSTANTS to YES. This creates a group item that contains data items matching the level-78 constant definitions.

Syntax:
CONTROL BLOCK ANSI-CONSTANTS  [YES|NO]
Default:
YES
Remarks:

If you set both of these configuration parameters to YES, the ANSI-CONSTANTS overrides the MF-CONSTANTS.

These configuration parameters are provided only as a compatibility support for previous releases of Dialog System on DOS. Current releases, including the UNIX version, provide both Micro Focus and ANSI style control blocks with the system software.


Data Block Indexed by Clause

The configuration parameter DATA BLOCK INDEXED BY CLAUSE causes an INDEXED BY clause to be appended to all the fields in a group. This enables group fields to be indexed as well as subscripted.

Syntax:
DATA BLOCK INDEXED BY CLAUSE  [YES|NO]
Default:
NO

Dialog System Beta Version Compatibility

The configuration parameter CONTROL BLOCK COMPATIBILITY causes Ds-Global-Proc and Ds-Local-Proc fields to be included in your generated COBOL copyfile.

Syntax:
CONTROL BLOCK COMPATIBLITY  [YES|NO]
Default:
NO
Remarks:

This configuration parameter is provided only as a compatibility support for previous releases of Dialog System on DOS.


17.3 Defaults for Palettes and Attributes

The configuration file can contain parameters that control the appearance of palettes and attributes for the following palettes:


Dialog System Screenset Palette

The configuration parameter PALETTE defines the default screenset palette used in the Colorize menu to map 16 system attributes onto the attributes used in the screenset. (See the chapter Using Dialog System for details.) The default panel attribute roll list is derived from this screenset palette. (See the chapter Panel Painting for details on setting the default attributes.)

Syntax:
PALETTE = X"h0h1h2h3h4h5h6h7h8h9hahbhchdhehf"
Parameters:
h0 thru hf The hexadecimal attribute values corresponding to each of the 16 screenset palette attribute entries. Whenever a new panel is defined, attributes h1 through h5 are taken as the default attribute roll list, and hf is taken as the default panel attribute.

You can view the list of colors and their associated hexadecimal values in the Colorize menu.

Default:

The Dialog System palette defaults are:

gray
yellow on a red background
brown
yellow
blue
white

The configuration file contains the following sample palette setting:

PALETTE = X"004E070E0F060B070300000000000007".

This sets the following attributes:

gray
yellow on a red background
gray
yellow
white
brown

You can either use this setting as it stands, or change it to the attributes you want. This default is commented out in the configuration file. To use it, simply delete the leading asterisk from this entry.


Dialog System Action Bar High Level Definition Palette

The configuration parameter CUA-PALETTE alters the attributes used by the Action Bar high level definition facility.

Syntax:
CUA-PALETTE = X"h0h1h2h3h4h5h6"
Parameters:
h0 through h6 Have the following values:

h0 Action Bar text attribute
h1 Action Bar selection cursor attribute
h2 Action Bar entry mnemonic attribute
h3 Pulldown window text attribute
h4 Pulldown window selection bar attribute
h5 Pulldown window border attribute
h6 Action Bar pulldown delimiter character attribute.
Default:
X"304F3F304F3130"

This sets the following attributes:

Foreground
Background
black light blue
white red
white light blue
black light blue
white red
blue light blue
black light blue

You can either use this setting as it stands or change it to the attributes you want. This default is commented out in the configuration file. To use it, simply delete the leading asterisk from this entry.

Remarks:

You can view the list of colors and their associated hexadecimal values in the Colorize menu described in the chapter Using Dialog System.


17.4 Printing Defaults

The configuration file contains parameters that control the way in which the following features of screensets appear when you print them:


Background Character

The configuration parameter DEFAULT BACKGROUND CHARACTER specifies the default background character used to fill any space left around a panel screen.

Syntax:
-DEFAULT BACKGROUND CHARACTER  char
Parameters:
char Any printable character.
Default:
":"

Page Size

The configuration parameter NO OF PRINT LINES ON A PAGE specifies the number of lines per page available on your printer.

Syntax:
+NO OF PRINT LINES ON A PAGE  number
Parameters:
number Number of print lines – must be at least 34.
Default:
60

ASCII Values

The configuration file contains a series of entries, each entry describing the character to print for each ASCII code.

Syntax:
ASCII VALUE: nnn - PRINT CHARACTER: char1  char2
Parameters:
nnn ASCII code for the character.
char1 Default character corresponding to that ASCII code.
char2 Character to actually print for that ASCII code.

The configuration file contains entries for all ASCII codes (001 to 255). To specify what to print for a particular ASCII code, alter the appropriate ASCII VALUE entry in the configuration file. Simply change char2 to the character you want to print for that code.

You must not alter the column position of either the ASCII number, which is in columns 14-16, or the new character you define, which is in column 48.


17.5 General Run-time Behavior

The configuration parameters described in this section control various aspects of run-time behavior:


Beep When Field is Full

The configuration parameter BEEP-EOF causes the beep to be sounded when a field that does not have the autoskip property (see the chapter Panel Fields) is filled.

Syntax:
[NO]BEEP-EOF
Default:
BEEP-EOF

Beep When Screen is Full

The configuration parameter BEEP-EOS causes the beep to be sounded when the last field on the screen is completed and no automatic exit (see the chapter Panel Fields) is in effect.

Syntax:
[NO]BEEP-EOS
Default:
BEEP-EOS

Beep on Invalid Keystroke

The configuration parameter BEEP-INVALID causes the beep to be sounded when an invalid keystroke is detected.

Syntax:
[NO]BEEP-INVALID
Default:
BEEP-INVALID

Large Cursor

The configuration parameter CURSOR-LARGE causes a larger than normal cursor to be used at run time. This improves screen readability.

Syntax:
CURSOR-LARGE
Default:

A normal size cursor is used.


Date Format

The configuration parameter DATEFORM enables you to specify a date format that overrides the screenset settings. You can use this parameter to change the date format for internationalization. You can use any of the four separate dateform types.

Syntax:
DATEFORM DDMM | MMDD 
DATEFORM MMYY | YYMM 
DATEFORM DDMMYY | MMDDYY | YYMMDD 
DATEFORM DDMMYYYY | MMDDYYYY
Default:

The format defined by the screenset.


Decimal Point

The configuration parameter DECIMALPOINT enables you to specify which character is used as the decimal point in numeric fields.

Syntax:
DECIMAL-POINT  "char"
Parameters:
char The character to be used.
Default:

"."


Cursor Position in Suppressed Decimal Fields

The configuration parameter DEC-SUPPRESS-CURSOR-RIGHT causes suppressed decimal fields to have the cursor located on the rightmost digit on entry to the field.

Syntax:
[NO]DEC-SUPPRESS-CURSOR-RIGHT
Default:

On entry to the field, the cursor is positioned on the decimal point character.


Empty Date Fields

The configuration parameter EMPTY-DATE-BLANK specifies that a date field with no value is displayed as:

  /  /

rather than:

00/00/00
Syntax:
EMPTY-DATE-BLANK
Default:

Empty date fields are displayed as 00/00/00.


Cursor Position in Numeric Fields

The configuration parameter IGNORE-NUMERIC-SETCUR causes the run-time component of Dialog System to ignore the effect of SETCUR functions when the cursor moves into a numeric field. This means that the cursor always moves to the first character position.

Syntax:
[NO]IGNORE-NUMERIC-SETCUR
Default:

SETCUR functions operate normally.


Enable Mouse Support

The configuration parameter MOUSE-ENABLE adds mouse support. Clicking the left mouse button anywhere within the current input field causes the cursor to relocate to that position. You do not need to add new dialog code: the behavior is instantly available on existing screensets when this parameter is set.

Syntax:
[NO]MOUSE-ENABLE
Default:

No mouse support.


NLS Folding

The configuration parameter NLS causes alphabetic characters entered into a panel field to be folded (see the chapter Panel Fields). If the required NLS routines are not linked into the application, the application will abort on failing to invoke the NLS folding routines.

Syntax:
[NO]NLS
Default:

If no setting is included, the application will operate in NLS folding mode if the NLS support routine are linked in; otherwise, it will default to non-NLS behavior.


Path Not Cleared

The configuration parameter NOCLEAR-PATH specifies that when a QUIT is issued and there are no screensets remaining on the PUSH stack, any path previously set up in dialog is not cleared.

Syntax:
[NO]CLEAR-PATH
Default:

The path is cleared.


Non-Echoed Fields

The configuration parameter NOECHO-CHARACTER specifies the character to be displayed when data is entered into a field with the no echo property (see the chapter Panel Fields).

Syntax:
NOECHO-CHARACTER  "char"
Parameters:
char The character to be used.
Default:

Space.


Shadow on Displayed Panel

The configuration parameters SHADOWRB1 and SHADOWRB2 enable you to specify that a panel is displayed with a shadow appearance at run time. The panel must be in a screenset that uses Micro Focus Panels, rather than normal panels. You can define the character to display the shadow, and that character's attribute value, for a list of panels by defining each individual panel.

However, each shadow uses a Micro Focus Panel itself, so it reduces the number of panels available to the screenset. You must ensure that you do not exceed the maximum panel limit (see the section Normal/Micro Focus Panels (F2) in the chapter Using Dialog System). For efficiency, you should also remove any shadow definitions from dsdef.cfg that do not apply to the application you are running.

Syntax:
SHADOWRB1 screenset panel X"xx" [character]
SHADOWRB2 screenset panel X"xx" [character]
Parameters:
screenset the screenset name.
panel the panel name in the screenset.
xx the hexadecimal value specifying the attribute of the shadow character. If you specify X"00", the shadow on Windows is black.
character the character to use to display the shadow. If you omit this parameter, the space character is used.
Remarks:

SHADOWRB1 results in a shadow to the right and bottom of the panel using a character width of one. SHADOWRB2 results in a shadow to the right and bottom of the panel using a character width of two.


Sign Position in Signed Numeric Fields

The configuration parameter SIGN-TRAILING enables you to specify that all numeric signed fields are displayed with a trailing sign.

Syntax:
[NO]SIGN-TRAILING
Default:

Signed numeric fields are displayed with a leading sign.


Cursor Position in Suppressed Numeric Fields

The configuration parameter SUPPRESS-CURSOR-RIGHT causes suppressed numeric fields to have the cursor located on the rightmost digit on entry to the field.

Syntax:
[NO]SUPPRESS-CURSOR-RIGHT
Default:
SUPPRESS-CURSOR-RIGHT

Appearance of Suppressed Numeric Fields

The configuration parameter SUPPRESS-TO-BWZ enables you to specify that the integer part of all numeric suppressed fields are blank when they are zero.

Syntax:
[NO]SUPPRESS-TO-BWZ
Default:

Numeric supressed fields that are zero are displayed as a single 0 character.


UNIX Character Set Support

The configuration parameter TERMINAL controls character set support for screensets developed or run on UNIX systems. This configuration parameter is ignored if you are running in a non-UNIX environment.

Syntax:
TERMINAL    DOS8|GENERIC8|GENERIC
Parameters:
DOS8 Makes use of the extended DOS character set if your terminal supports this character set.
GENERIC8 Makes use of non-DOS character sets, such as ISO-8859 or HP LaserJet ROMAN-8.
GENERIC Specifies standard UNIX behavior; that is, characters greater than hex 7F are ignored, except for line-drawing characters, which are converted to the nearest UNIX equivalent.
Default:
TERMINAL GENERIC

When a screenset is loaded at run time, the actions taken depend on the type of screenset (DOS or UNIX) and the setting of the TERMINAL parameter.The following table summarizes the effects of the possible combinations of the screenset type and the TERMINAL setting:

Screenset Type
TERMINAL Setting
Actions on Loading Screenset
DOS GENERIC Translate DOS line-drawing chars to UNIX equivalents.
Translate characters <32 to spaces.
Translate characters >127 to spaces.
DOS GENERIC8 Translate DOS line-drawing chars to UNIX equivalents.
Translate characters <32 to spaces.
Translate characters >127 to spaces.
DOS DOS8 No translation required.
UNIX GENERIC Translate internal UNIX line-drawing chars to UNIX terminal characters.
Translate characters <32 to spaces.
Translate characters >127 to spaces.
UNIX GENERIC8 Translate internal UNIX line-drawing characters to UNIX terminal characters.
UNIX DOS8 Translate internal UNIX line-drawing characters to DOS.
Remarks:

The setting of the TERMINAL parameter also affects the actions taken when you create or edit a screenset, as shown by the following table:

TERMINAL Setting
Action on Creating/Editing Screenset
GENERIC Paint using UNIX terminal draw characters.
GENERIC8 Paint using UNIX terminal draw characters.
DOS8 Paint using DOS draw characters.

The setting of the TERMINAL parameter also affects the way in which a screenset is saved, as shown in the following table:

TERMINAL Setting
Action on Saving Screenset
GENERIC Save as a DOS screenset. Translate UNIX terminal draw characters to DOS.
GENERIC8 Save as a UNIX screenset. Translate UNIX terminal draw characters to UNIX internal draw characters.
DOS8 Save as a DOS screenset. No translation required.

See the chapter Character Set Support on UNIX for more details.


Keyboard Timeout

The configuration parameter TIMEOUT causes a regular invocation of a user-supplied program. This provides a degree of system control to carry out various functions, for example, to initiate regular backups or cause an emergency shutdown.

This timeout is active only when the cursor is in an input field; it is a keyboard timeout, and is reset whenever the user hits a key.

Syntax:
TIMEOUT  user-written-program-name n...nn
Parameters:
user-written-program-name Is the name of a program written by you, to be invoked at a given interval.
n...nn Is the time, in seconds, between each automatic invocation of the user-written program (theoretically up to 9999999 seconds). 0 is treated as invalid, and no calls are made to the user-written-program.
Remarks:

The Dialog Screenset itself might use timeout in its own logic - for example, displaying a help panel if the user has not entered any data for 1 minute. The new timeout mechanism described here is designed to coexist with and not affect any other screenset timeouts.

In cases where the screenset timeout period is shorter that the period set for configuration timeout in dsdef.cfg, then configuration timeout may never occur. It is thus important that the user-written program is activated for all timeouts. A flag in the parameters passed to the user-written program indicates which sort of timeout triggered the entry.

Where the configuration timeout period is shorter than the screenset timeout period, then an entry will be made to the user-written program for each elapsed configuration timeout period up until the total elapsed time matches the screenset timeout period, when an entry will be made for this too.

The single parameter passed to the user written program is in the form of a parameter block:

01  param-block.
    03  screenset-name          pic x(8).
    03  screen-name             pic x(8). 
    03  field-name              pic x(30).  
    03  timeout-type            pic x.     
        88  screenset-timeout   value "S".     
        88  config-timeout      value "C".  
    03  action                  pic x comp-x.   
        88  retc-timeout        value 1.

where the first three fields identify the current screenset, screen and field in the system, the next identifies whether the timeout is a screenset timeout (that is, the conventional timeout), or a configuration file timeout (that is, the new type), and the last is an action field which the user written program may set to value 1 to cause an immediate return to the application, with an error status of 17 in DS-SYSTEM-ERROR-NO.

This error status is really a notification signal to the application rather than a true error, and DSRUN may be subsequently called again. When the user-written program exits back to Dialog System without requesting an immediate return to the application, then Dialog System will take different courses of action depending on the type of timeout that occurred:

Dialog System determines which sort of timeout has occurred by inspecting the timeout-type field on return from the user-written program.

Thus, in general your own program should not amend this field.


Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousCharacter Set Support on UNIX Common Questions and AnswersNext