Progress
Results User’s Guide
for UNIX


Character Display Formats

If the default display format for a character field is x(8), this means that any characters after the first eight are dropped if you do not supply an explicit format. The “x” represents an alphanumeric character position, and the “8" represents the number of characters Results should display. You can override this format in the Settings option in the Reports and Data Export modules.

You can use several different symbols to define a character format: X, N, A, ! and 9. You can also add characters to the display, such as parentheses around an area code in a phone number. Table C–2 defines the symbols you can use to define character field display formats.

Table C–2: Character Display Format Symbols 
Symbol
Use or Explanation
X
Represents any character.
N
Represents a digit or a letter. A blank (space) is not allowed.
A
Represents a letter. A blank is not allowed.
!
Represents a letter that is converted to uppercase during input. A blank is not allowed.
9
Represents a digit. A blank is not allowed.
(n)
Represents a number indicating how many times to repeat the previous format character. For example, !(5) is the same as !!!!! and represents five characters that are to display in uppercase.
fillchar
Represents a “fill” display. You can use any character or characters you want to fill a display. For example, if you display the value abc with a format of x(3)***, the displayed value is abc***.

To use X, N, A, !, or 9 as a fill character, you must precede that character with two tildes (~~). To use a left parenthesis (() as a fill character after a non-fill character, you must precede it with one tilde (~). (For example, if the field value is 123 and you enter a format of ~~x999, the displayed value is x123.)

Results does not store fill characters in the database; they are supplied when the field is formatted for display. This permits a field to be displayed with different fill characters in different contexts.

Table C–3 shows some examples of how to display a character value using different formats.

Table C–3: Character Display Format Examples 
Format
Value in Field
Display
xxxxxxxx
These are characters
These ar
x ( 9 )
These are characters
These are
x ( 20 )
These are characters
These are characters
xxx
These are characters
The
AAA-9999
abcd1234
abc-1234
! ! ! -9999
abcd1234
ABC-12341
(999) 999-9999
6176635000
(617) 663-5000
! !
ma
MA
  1. If you enter the characters abc1234 into a field defined with the format !!!-9999, then Results displays ABC-1234 on the screen and stores ABC1234 in the field. The hyphen is a fill character that appears only when the data is displayed in this particular format.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095