Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decimal point is comma 1

Status
Not open for further replies.

TomHall

Programmer
Jul 17, 2001
1
US
I have a report program that is run in the US and in Europe. There are two versions of the program but we are trying to make it just one. The problem in consolidating the program comes when addressing the format of the edited numeric values. The US side formats them zzz,zzz.99. The Europeon format is zzz.zz9,99. These edit strings depend on the special names value of "decimal-point is comma". It is like I am forced to choose between the edit string format at compile time. This doesn't seem to be very flexible. I think we can get around this by moving the fields to pic x, doing character replacements on the commas and periods, and using all pic x on the reports. Is there an easier way?
 
Assuming you are running on an IBM mainframe, there is no way at this time that you can make it one program with run-time differences. (Except the very awkward kludge which you describe.)
HOWEVER, the new COBOL Standard, due in 2002, will have a LOCALE run-time feature, which should solve your problem. It will also have "Conditional compilation", which would let you have one source module, but you would have to compile it twice, with different parameters for US and Europe.

Your compiler-maker MAY implement it before then. Get in touch with your compiler-maker to find out its schedule.

Stephen J Spiro
Member, J4 COBOL Standards Committee
check us out at
and
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top