Character Set Support on UNIX | Common Questions and Answers |
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.
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.
The configuration file can contain parameters that perform the following options when the copyfile is generated:
The configuration parameter CONTROL BLOCK EIGHTY EIGHTS enables you to place level-88 constants in the following control block fields:
CONTROL BLOCK EIGHTY EIGHTS [YES|NO]
NO
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.
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.
DATA BLOCK FLAGS EIGHTY-EIGHTS [YES|NO]
YES
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.
CONTROL BLOCK MF-CONSTANTS [YES|NO]
NO
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.
CONTROL BLOCK ANSI-CONSTANTS [YES|NO]
YES
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.
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.
DATA BLOCK INDEXED BY CLAUSE [YES|NO]
NO
The configuration parameter CONTROL BLOCK COMPATIBILITY causes Ds-Global-Proc and Ds-Local-Proc fields to be included in your generated COBOL copyfile.
CONTROL BLOCK COMPATIBLITY [YES|NO]
NO
This configuration parameter is provided only as a compatibility support for previous releases of Dialog System on DOS.
The configuration file can contain parameters that control the appearance of palettes and attributes for the following palettes:
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.)
PALETTE = X"h0h1h2h3h4h5h6h7h8h9hahbhchdhehf"
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. |
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.
The configuration parameter CUA-PALETTE alters the attributes used by the Action Bar high level definition facility.
CUA-PALETTE = X"h0h1h2h3h4h5h6"
h0 through h6 |
Have the following values:
|
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.
You can view the list of colors and their associated hexadecimal values in the Colorize menu described in the chapter Using Dialog System.
The configuration file contains parameters that control the way in which the following features of screensets appear when you print them:
The configuration parameter DEFAULT BACKGROUND CHARACTER specifies the default background character used to fill any space left around a panel screen.
-DEFAULT BACKGROUND CHARACTER char
char |
Any printable character. |
":"
The configuration parameter NO OF PRINT LINES ON A PAGE specifies the number of lines per page available on your printer.
+NO OF PRINT LINES ON A PAGE number
number |
Number of print lines must be at least 34. |
60
The configuration file contains a series of entries, each entry describing the character to print for each ASCII code.
ASCII VALUE: nnn - PRINT CHARACTER: char1 char2
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.
The configuration parameters described in this section control various aspects of run-time behavior:
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.
[NO]BEEP-EOF
BEEP-EOF
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.
[NO]BEEP-EOS
BEEP-EOS
The configuration parameter BEEP-INVALID causes the beep to be sounded when an invalid keystroke is detected.
[NO]BEEP-INVALID
BEEP-INVALID
The configuration parameter CURSOR-LARGE causes a larger than normal cursor to be used at run time. This improves screen readability.
CURSOR-LARGE
A normal size cursor is used.
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.
DATEFORM DDMM | MMDD DATEFORM MMYY | YYMM DATEFORM DDMMYY | MMDDYY | YYMMDD DATEFORM DDMMYYYY | MMDDYYYY
The format defined by the screenset.
The configuration parameter DECIMALPOINT enables you to specify which character is used as the decimal point in numeric fields.
DECIMAL-POINT "char"
char |
The character to be used. |
"."
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.
[NO]DEC-SUPPRESS-CURSOR-RIGHT
On entry to the field, the cursor is positioned on the decimal point character.
The configuration parameter EMPTY-DATE-BLANK specifies that a date field with no value is displayed as:
/ /
rather than:
00/00/00
EMPTY-DATE-BLANK
Empty date fields are displayed as 00/00/00.
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.
[NO]IGNORE-NUMERIC-SETCUR
SETCUR functions operate normally.
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.
[NO]MOUSE-ENABLE
No mouse support.
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.
[NO]NLS
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.
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.
[NO]CLEAR-PATH
The path is cleared.
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).
NOECHO-CHARACTER "char"
char |
The character to be used. |
Space.
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.
SHADOWRB1 screenset panel X"xx" [character]
SHADOWRB2 screenset panel X"xx" [character]
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. |
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.
The configuration parameter SIGN-TRAILING enables you to specify that all numeric signed fields are displayed with a trailing sign.
[NO]SIGN-TRAILING
Signed numeric fields are displayed with a leading sign.
The configuration parameter SUPPRESS-CURSOR-RIGHT causes suppressed numeric fields to have the cursor located on the rightmost digit on entry to the field.
[NO]SUPPRESS-CURSOR-RIGHT
SUPPRESS-CURSOR-RIGHT
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.
[NO]SUPPRESS-TO-BWZ
Numeric supressed fields that are zero are displayed as a single 0 character.
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.
TERMINAL DOS8|GENERIC8|GENERIC
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. |
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. |
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.
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.
TIMEOUT user-written-program-name n...nn
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. |
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 © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Character Set Support on UNIX | Common Questions and Answers |