Using QMF

Using DBCS in form panels

You can use DBCS or mixed data in the form panels as any of the following:

Double-byte characters can also appear in the FORM as column labels. For more information about column labels, see the QMF Reference, SC26-4716-05.

The following descriptions show ways in which DBCS or mixed data differs from the SBCS data. The QMF Reference, SC26-4716-05 fully describes the use of form panels for single-byte characters.

Report Width: The report width shown at the top of the FORM.MAIN panel indicates the width of the current report in character positions. Indents, SO and SI delimiters, and characters are counted to calculate this width. A single-byte character counts as one position; a double-byte character counts as two positions. SO and SI delimiters count as one position each.

Column Headings: The underscore (_) character on the form indicates where an SBCS column heading breaks and continues on another line. DBCS data strings can be broken if the underscore used is a single-byte character.

Column headings appearing on the default form are the same as the column names in the database table, unless your installation uses column labels. For columns that have column labels, the labels appear in place of column names on the default form.

USAGE: Form usage codes must be single-byte characters.

INDENT: The leading SO value in a column with graphic data type appears in the indent space. Therefore, the indent value for a graphic data column must be 1 or more when the leading character in the column is SO.

WIDTH: The width of a column is specified in number of characters. Although a double-byte character is twice as wide as a single-byte character, a character of either type is always counted as one character when calculating the column width.

With mixed SBCS and DBCS data (in columns with a data type of character), the SO and SI delimiters are counted as part of the column width. If you are using double-byte characters in a column with a data type of character, the width of that column shown on FORM.MAIN and FORM.COLUMN should be 4 or larger. The minimum column width to display one double-byte character is 4.

With DBCS data (in columns with a data type of graphic), the leading SO is not counted in the column width, but the SI character is part of the width. The minimum column width shown on FORM.MAIN and FORM.COLUMN for columns with a data type of graphic is 1.

EDIT codes: You must enter edit codes on the form in single-byte characters. You can use edit codes that begin with G only with DBCS data. You can use codes that begin with C with either DBCS or mixed data.

Table 15. How DBCS characters display with different edit codes

Edit Code Purpose Effect on Display
C Columns of data defined as character type The display of a value is unchanged.
G Columns of data defined as graphic type The display of a value is unchanged.
CW Columns of character data you want wrapped The display of a value is unchanged, but, if the value cannot fit on one line in the column, CW tells QMF to wrap the text according to the width of the column. Instead of cutting off the data at the end of the column, QMF puts as much data as it can on a line in the column, then wraps the data onto the next line.

When you use the CW edit code for a column that contains mixed data, the minimum width for the column is 4.

GW Columns of graphic data you want wrapped The value itself is unchanged, but if the value cannot fit on one line in the column, GW tells QMF to wrap the text according to the width of the column. Instead of cutting off the data at the end of the column, QMF puts as much data as it can on a line in the column, then wraps the remaining data on subsequent lines.
CT Columns of character data you want wrapped according to the column text The value itself is unchanged, but if the value cannot fit on one line in the column, CT tells QMF to wrap the column according to the text in the column. That is, instead of cutting off the data at the end of the column, QMF fits as much data as possible on a line, interrupts the line when it finds a single-byte blank, and continues wrapping the data on the next line. If a string of data is too long to fit in the column and does not contain a single-byte blank, QMF wraps the data by width until it finds a single-byte blank and can continue wrapping by text.

When you use the CT edit code for a column that contains mixed data, the minimum width for the column is 4.

CDx Columns of character data you want wrapped according to a delimiter QMF begins a new line in the column each time it sees a special delimiter in the text. In this edit code, x is the special delimiter that can be any single-byte character, including a blank. It does not appear in the output.

QMF does not permit column wrapping of graphic data by delimiter. QMF will wrap columns of mixed data by delimiter if the delimiter is outside the DBCS data string. When you use this edit code for a column containing mixed data, the minimum width for the column is 4.

If a string of data is too long to fit in the column and does not contain a delimiter, QMF wraps the data by width until it finds a delimiter and can continue wrapping by it. If a string of data contains multiple successive delimiters, QMF inserts a blank line for each one after the first. For example, if the data contains two delimiters, QMF begins a new line when it gets to the first delimiter, skips a line when it gets to the second delimiter, and then continues wrapping the output.

Uxxxx and Vxxxx Custom edit codes defined at your installation Format data in ways you define using an edit exit routine you write. Replace xxxx in this code with an identifier that names a unique code. See your QMF administrator for a description of your available custom edit codes.

How incorrect DBCS data is handled

When an SO or SI character is missing from a DBCS data string, the existing SO or SI character appears as a question mark. All other double-byte data appears as single-byte characters and is meaningless.

How data truncation Is handled

QMF truncates displayed DBCS data at a field or a screen boundary in a way that avoids splitting double-byte characters. Scrolling is necessary to view the characters on the truncated lines.

SO or SI delimiters are added where truncation occurs. Set the scrolling value to less than the screen width on report panels and QBE query panels to ensure that you do not miss characters that are out of the regular screen view.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]