Cobol has an input mask format similar to the following:
Using integer 345
picture "99999" yields 00345
picture "zzzz9" yields 345
or even "zzzVzz" yields 3.45
"9zzzVzz" invalid (9 to the left of z).
"$zzVzz" floating dollar $3.45
results in $12,345.67
V is dot in non metric countries, and
Some software uses the T to indicate comma. T is comma , in USA, and dot . in metric countries.
Is there already a routine that does this? something like
There is a rule for sign (when integer was negative). S
$SzzzTzzzVzz or $zzzTzzzVzzS