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

Question ID : 229
Created on 2013-12-23 at 4:23 AM
Author : Valerio Biolchi [valerio.biolchi@veryant.com]

Online URL : http://support.veryant.com/support/phpkb/question.php?ID=229



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.


Back to Original Question