DBMONEY environment variable

Use the DBMONEY environment variable to specify the display format of values in columns of smallfloat, FLOAT, DECIMAL, or MONEY data types, and of complex data types derived from any of these data types.


1  setenv DBMONEY
2.1! '$'
2.1 front
2.1 'front '
2.1! .
2.1 ,
2.1 back
2.1 'back'
$
is a currency symbol that precedes MONEY values in the default locale if no other front symbol is specified, or if DBMONEY is not set.
, or .
is a comma or period (the default) that separates the integral part from the fractional part of the FLOAT, DECIMAL, or MONEY value. Whichever symbol you do not specify becomes the thousands separator.
back
is a currency symbol that follows the MONEY value.
front
is a currency symbol that precedes the MONEY value.

The back symbol can be up to seven characters and can contain any character that the locale supports, except a digit, a comma ( , ), or a period ( . ) symbol. The front symbol can be up to seven characters and can contain any character that the locale supports except a digit, a comma ( , ), or a period ( . ) symbol. If you specify any character that is not a letter of the alphabet for front or back, you must enclose the front or back setting between single quotation ( ' ) marks.

When you display MONEY values, HCL Informix® products use the DBMONEY setting to format the output. DBMONEY has no effect, however, on the internal format of data values that are stored in columns of the database.

If you do not set DBMONEY, then MONEY values for the default locale, U.S. English, are formatted with a dollar sign ( $ ) that precedes the MONEY value, a period ( . ) that separates the integral from the fractional part of the MONEY value, and no back symbol. For example, 100.50 is formatted as $100.50.

For more information about how DBMONEY formats MONEY values in nondefault locales, see the Informix® GLS User's Guide.