|Printing||Setting Up the Configuration File|
Dialog System on UNIX supports the use of character sets other than the standard ASCII character set. This chapter describes:
Dialog System supports two types of screenset; DOS screensets and UNIX screensets.
A DOS screenset is one that contains only data in the extended DOS character set.
All screensets you create on a DOS system are DOS screensets. Screensets you create on a UNIX system are DOS screensets unless you specify a configuration parameter in the configuration file (see the section UNIX Screensets later in this chapter). DOS screensets can run on UNIX systems, with the following restrictions (by default):
hex 00 hex 1F
If your UNIX terminal supports the extended DOS character set, you can specify the configuration parameter TERMINAL DOS8 (see the chapter Setting Up the Configuration File for details). This parameter removes the above restrictions on running DOS screensets on UNIX systems.
By default, screensets you create on a UNIX system are DOS screensets. However, you can set the configuration parameter TERMINAL GENERIC8 in your configuration file, so that all screensets you create are UNIX screensets.
You can create UNIX screensets only on a UNIX system, and UNIX screensets are not portable to DOS systems.
See the chapter Setting Up the Configuration File for more details of these configuration parameters.
UNIX screensets support character sets containing non-English characters, such as ISO-8859 and HPRoman8 (HP LaserJet ROMAN-8).
UNIX screensets also support the use of line-drawing characters, even where the character set itself does not include line-drawing characters. All line-drawing characters in a UNIX screenset are stored internally as characters in the range hex 00 to hex 1F (the unused range of the character set). The internal representation of line-drawing characters is as follows:
|05||top left corner|
|06||top right corner|
|07||bottom right corner|
|08||bottom left corner|
When the screenset is loaded, these internal characters are converted to the line-drawing characters expected by the terminal in use, as defined in terminfo. If no line-drawing characters are defined, characters in the internal format are converted to simple character equivalents.
If a screenset has been designed and saved as a UNIX screenset, users must also have the TERMINAL GENERIC8 configuration parameter set when they run the screenset so that non-English and line-drawing characters are handled correctly.
If you intend to transfer a screenset from UNIX to DOS, remember to name it in upper case, because DOS supports upper case only.
You can use the utility, SSTRAN, to either convert between screensets using the extended DOS character set, and screensets using DOS, Windows or OS/2 character sets, or convert attributes in a screenset. You can also use the utility to convert between different DOS character sets (codepages).
To use the conversion utility, enter a command line of the form:
cobrun SSTRAN -a [-y] input-screenset output-screenset translation-file
where the parameters are:
||A flag indicating that this is an attribute conversion.|
||An optional parameter that is equivalent to the user
responding "yes" to each prompt produced by the utility. The
only prompt currently produced asks the user to confirm that they wish
to overwrite the input screenset with the output screenset; this occurs
when you specify the same filename for
||The filename (including path) of the screenset to be converted. This can be up to 65 characters long.|
||The filename (including path) of the converted screenset. This can be up to 65 characters long. The output filename before the file extension must be identical to the input filename. You can use the same, or a different file extension.|
||The filename (including path) of the translation file that controls the conversion. See the next section for details.|
Text and attributes cannot be converted at the same time: a separate run is needed for each.
A translation file is an ASCII text file that controls the operation of the SSTRAN screenset conversion utility.
A translation file can contain the following types of entry:
Any line beginning with "*" is treated as a comment. You can also include blank lines.
Directives indicate to SSTRAN whether the input and output screensets are DOS or UNIX. The following directives are available:
A translation file must contain one SOURCE directive and one TARGET directive.
A translation table is a series of lines that describe the character substitutions to be performed. Each line controls the setting of 16 bytes, and has the form:
||specifies which 16 bytes in the character set are controlled by this line. For example, the digit B indicates that this line controls the translation of characters in the range hex B0 to hex BF.|
||specifies the characters to which the input characters are to be converted.|
For example, to convert input characters in the range hex B0 to hex BF into the uppercase alphabetic characters ABCDEFGHIJKLMNOP, you would specify the following translation line:
To leave some characters unconverted, specify hex 00 in the appropriate position in the conversion string. Using the previous example, to leave the characters B5, B6, and BF unconverted, you would specify the following translation line:
If none of the corresponding characters are to be converted, so the entire translation line would contain 00, you do not have to specify a line in the translation table for the range.
Micro Focus provides a number of text translation files:
|DOS codepage 437 to UNIX
DOS codepage 437 to ISO 8859
DOS codepage 850 to ISO 8859
DOS codepage 850 to HPRoman8
DOS codepage 850 to UNIX
These files contain detailed comments about translation file format.
When converting attributes, you do not need to define the screenset type, so the SOURCE and TARGET directives are not required. To ensure that a text translation file is not used instead of an attribute translation file, and vice versa, we recommend that you do not include SOURCE and TARGET directives in the attribute tranlsation file.
To leave some characters unconverted, specify hex FF in the appropriate position in the conversion string.
If none of the corresponding characters are to be converted, so the entire translation line would contain FF, you do not have to specify a line in the translation table for the range.
Micro Focus provides two attribute translation files:
|Colors in a screenset to monochrome attributes
supported by DOS
Old style UNIX monochrome attributes (DS1.1) to new fully portable style
Dialog System enables you to execute screensets that have been defined on DOS, on a UNIX system.
You can transfer screensets from the DOS creation environment into the appropriate UNIX directory using a binary transfer method.
When you transfer screensets from a DOS to a UNIX environment, UNIX imposes the following limitations on line-drawing. The limitations apply only to the display; the data actually stored is not affected.
Note: These restrictions do not apply if you use the TERMINAL DOS8 configuration parameter.
If you do not specify the TERMINAL DOS8 configuration parameter described earlier in this chapter, the set of UNIX characters supported contains the ASCII characters in the range space to tilde (~), that is hexadecimal values 20 to 7e, and the following single-line drawing characters:
top left of box
top right of box
bottom right of box
bottom left of box
The actual graphic characters are machine dependent. If your system does not support these characters, the equivalent ASCII characters are displayed.
When you move the screensets from DOS to UNIX and create your COBOL application, you might need to modify some of the filenames in your application. This is because the filename of a screenset must match exactly the filename for that screenset as it appears in your COBOL source code. If the filenames do not match, you must modify either the file name of the screenset or your application program so that the names correspond exactly.
This is more important when you transfer screensets from DOS to UNIX, because UNIX leaves the case and capitalization of filenames exactly as they were originally entered, whereas DOS systems convert all filenames entered to upper case. When your application program calls Dsrun to request a screenset, Dialog System searches for a screenset with the exact same filename as specified in your program. In a UNIX system, if the capitalization of the screenset filename does not match exactly, Dsrun cannot find the requested screenset and an error message is returned. For example, if your application program contains the following:
move "DStutor" to DS-set-name
Dsrun searches for DStutor.s. It does not search for any variations in capitalization such as "DSTUTOR" or "dstutor". So, if this screenset appears as "DStutor" in your application program but has a filename of "DSTUTOR", Dsrun cannot find it.
Dialog System automatically adds an .s extension to your screenset filename, so you do not have to specify the extension yourself. If you do specify the extension, Dialog System searches for the extension in the case that you specify.
These rules on case sensitivity also apply to any error message files. These files must be in the working directory at run time.
Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
|Printing||Setting Up the Configuration File|