Edit Codes for Character Data

Use CW, CT, and CDx edit codes with DATE, TIME, and TIMESTAMP values to allow column wrapping.

C
Makes no change in the display of a value.
CW
Makes no change in the display of a value, but if the value cannot fit on one line in the column, 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, and then continues wrapping the data on the next line in the column.

Data in column-wrapped columns (CW, CT, CD, XW, and BW edit codes) is always aligned using default alignment. (Alignment for headings in column wrapped columns can be modified.) LEFT, CENTER, and RIGHT alignment are ignored for these edit codes. (See Column alignment.)

If your installation uses DBCS data, you can use the CW edit code on columns of mixed double-byte and single-byte character data. The minimum width of such a column is 4.

The following examples show a report before and after the width of the LOCATION column is reduced and its edit code changed to CW.

Before column wrapping:

   DEPTNAME        LOCATION
   --------------  -------------
   HEAD OFFICE     NEW YORK
   PACIFIC         SAN FRANCISCO

After column wrapping:

   DEPTNAME        LOCAT
   --------------  -----
   HEAD OFFICE     NEW Y
                   ORK
   PACIFIC         SAN F
                   RANCI
                   SCO
CT
Makes no change in the display of a value, but if the value cannot fit on one line in the column, tells QMF to wrap the column according to the text in the column. 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 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 blank, QMF wraps the data by width until it finds a blank and can continue wrapping by text.

If your installation uses DBCS data, you can use the CT edit code on columns of mixed double-byte and single-byte character data. QMF interrupts the line when it finds an SBCS blank. The minimum width of such a column is 4.

The following examples show a report before and after the width of the LOCATION column is reduced and its edit code changed to CT.

Before column wrapping:

   DEPTNAME        LOCATION
   --------------  -------------
   HEAD OFFICE     NEW YORK
   PACIFIC         SAN FRANCISCO

After column wrapping:

   DEPTNAME        LOCAT
   --------------  -----
   HEAD OFFICE     NEW
                   YORK
   PACIFIC         SAN
                   FRANC
                   ISCO
 
CDx
Tells QMF to wrap the column according to a delimiter in the text. QMF begins a new line in the column each time it sees a special delimiter in the text. For this edit code, replace the x with the special delimiter. It can be any character, including a blank, and does not appear in the output.

If your installation uses DBCS data, you can use the CDx edit code on columns of mixed double-byte and single-byte character data. The minimum width of such a column is 4, and the delimiter must be outside of the DBCS string.

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 shows 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.

The following examples show a report before and after the width of the LOCATION column is reduced and its edit code changed to CD&.

Before column wrapping:

   DEPTNAME        LOCATION
   --------------  -------------
   HEAD OFFICE     NEW YORK
   PACIFIC         SAN FRANCISCO

After column wrapping:

   DEPTNAME        LOCATION
   --------------  ---------
   HEAD OFFICE     NEW
                   YORK
   PACIFIC         SAN
                   FRANCISCO

X
Formats data as a series of hexadecimal characters.
XW
Formats data as a series of hexadecimal characters. Column wrapping for XW follows the same rule as for CW.
B
Formats data as a series of 0's and 1's.
BW
Formats data as a series of 0's and 1's. Column wrapping for BW follows the same rule as for CW.

When you use edit codes CW, CT, CD, XW, and BW, column wrapping is only performed when tabular data is displayed or printed. A reference to &n in a text line only displays the first line of the wrapped data.

[ Previous Page | Next Page | Contents | Index ]