The SPELLNM function spells out an alphanumeric string or numeric value containing two decimal places as dollars and cents. For example, the value 32.50 is THIRTY TWO DOLLARS AND FIFTY CENTS.
SPELLNM(outlength, number, output)
Is the number of characters in output.
If you know the maximum value of number, use the following table to determine the value of outlength:
If number is less than...
...outlength should be
Alphanumeric or Numeric (9.2)
Is the number to be spelled out. This value must contain two decimal places.
SPELLNM spells out the values in CURR_SAL and stores the result in a column with the format A82:
SPELLNM(82, CURR_SAL, 'A82')
For $13,200.00, the result is THIRTEEN THOUSAND TWO HUNDRED DOLLARS AND NO CENTS.
For $18,480.00, the result is EIGHTEEN THOUSAND FOUR HUNDRED EIGHTY DOLLARS AND NO CENTS.