How can I get the character used as decimal separator on the os?


It's possible to retrieve this info using from isCOBOL the classes:


java.text.DecimalFormat
java.text.DecimalFormatSymbols

Here is a simple isCOBOL sample source:

program-id. prg.

configuration section.
repository.
 class j as "java.text.DecimalFormat"
 class j2 as "java.text.DecimalFormatSymbols"

working-storage section.
77 var pic x any length.
77 w-j object reference j.
77 w-j2 object reference j2.

procedure division.
main.      
 set w-j to j:>new()
 set w-j2 to w-j:>getDecimalFormatSymbols()
 set var to w-j2:>getDecimalSeparator()
 display "Decimal separator is: " var.
 stop run.


Article ID: 229
Created: December 23, 2013
Last Updated: December 23, 2013
Author: Support KB Author

Online URL: https://support.veryant.com/support/phpkb/article.php?id=229