Defining formats
- Last Updated: June 10, 2026
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
The list of default formats for different data types introduced you to some of the format characters supported by ABL. The following table provides a quick summary of the format symbols you are most likely to use.
| This format character . . . | Represents . . . |
|---|---|
X |
Any single character. |
N |
A digit or a letter. A blank is not allowed. |
A |
A letter. A blank is not allowed. |
! |
A letter that is converted to uppercase during input. A blank is not allowed. |
9 |
A digit. A blank is not allowed. |
(n) |
A number that indicates how many times to repeat the previous format character. |
> |
A leading digit in a numeric value, to be suppressed if the number does not have that many digits. |
< |
Used in conjunction with > to implement floating-decimal format. The < character (up to 10) must appear to the right of the decimal and be balanced by an equal or greater number of > characters left of the decimal. A digit is displayed in a position formatted with < when the corresponding > is a leading zero (and the stored value has the required precision). |
Z |
A leading digit in a numeric value, to be replaced by a blank if the number does not have that many digits. |
* |
A leading digit in a numeric value, to be displayed as an asterisk if the number does not have that many digits. |
, |
A comma in a numeric value greater than 1,000. This is replaced by a period in European format. It is suppressed if it is preceded by a Z, *, or >, and the number does not have enough digits to require the comma. |
. |
A decimal point in a numeric value. This is replaced by a comma in European format. |
+ |
A sign for a positive or negative number. It is displayed as + for a positive number, and as – for a negative number. |
– |
A sign for a negative number. It is displayed as – for a negative number. For a positive number it is suppressed if it is to the left of the decimal point in the format, and replaced by a blank if it is to the right. |
CR or cr |
Display negative values with the string "CR" after
it. |
DB or db |
Display negative values with the string "DB" after
it. |
DR or dr |
Display negative values with the string "DR" after
it. |
() |
Display negative values in parentheses. |
You can insert other characters as you wish into formats, and
they are displayed as literal values. For example, the INTEGER value
1234 with the FORMAT
Format Character Examples
Note: In the Output column, the leading and
trailing
| characters mark the boundaries of the formatted result so that
leading and trailing blanks are visible. The pipes are not part of the output.| Format char | Example FORMAT | Sample value | Output | Notes |
|---|---|---|---|---|
X |
XXXXXXXX |
"Order#42" |
|Order#42| |
Accepts any character. |
(n) |
X(5) |
"Hello" |
|Hello| |
Repeats the preceding format character n times. |
A |
A(5) |
"Smith" |
|Smith| |
Accepts letters only. |
N |
N(6) |
"ABC123" |
|ABC123| |
Accepts letters and digits only. |
! |
!(5) |
"abl12" |
|ABL12| |
Converts letters to uppercase. |
9 |
999 |
42 |
|042| |
Reserves a slot for one digit; pads with leading zeros. |
Z |
ZZ9 |
5 |
| 5| |
Suppresses leading zeros in fixed positions. Unlike >,
Z does not participate in floating-decimal behavior with
<. |
* |
**9 |
5 |
|**5| |
Reserves a slot for one digit; shows * instead of a leading
zero. |
> |
>>9 |
5 |
| 5| |
Reserves a digit slot; leading zeros display as blanks. |
, |
>,>>9 |
1234 |
|1,234| |
Thousands separator. |
. |
9.99 |
3.14 |
|3.14| |
Decimal point. |
> and < |
>,>>>,>>9.99 |
1234.567 |
| 1,234.57| |
Rounds to fit the allotted number of decimal places. |
> and < |
>,>>9.99<<<< |
1234.567 |
|1,234.57| |
All > positions to the left of the decimal point are
filled, so no < positions to the right are used. |
> and < |
>,>>9.99<<<< |
12.34567 |
| 12.3457| |
Two > positions to the left of the decimal point are
unfilled so they are available to display digits to the right of the decimal
point. |
+ |
+99 |
42 / -42 |
|+42| / |-42| |
Always shows the sign. |
- |
-99 |
42 / -42 |
| 42| / |-42| |
Shows the sign only for negative values. |
CR |
>>>9CR |
42 / -42 |
| 42 | / | 42CR| |
Appends the literal characters CR to negative values; blanks
for positive values. |
DB |
>>>9DB |
42 / -42 |
| 42 | / | 42DB| |
Appends the literal characters DB to negative values; blanks
for positive values. |
DR |
>>>9DR |
42 / -42 |
| 42 | / | 42DR| |
Appends the literal characters DR to negative values; blanks
for positive values. Synonym for DB. |
( ) |
(>>>9) |
42 / -42 |
| 42 | / | (42)| |
Wraps negative values in parentheses; positives show blanks in the parenthesis positions. |