Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the decimal data types supported by COBOL and can Java incorporate any of these data types?

0
Posted

What are the decimal data types supported by COBOL and can Java incorporate any of these data types?

0

Answer I do not know the format of the JAVA BigDecimal data type. However, JAVA 1.5 now supports some new Decimal data types. I don’t know how that would be supported in COBOL. COBOL does not directly support BigDecimal, that I know of. You need to check the specifics of the COBOL / JAVA interoperability supported for your specific version of COBOL. I know the new COBOL 2002 standard provides improved support for JAVA/COBOL interaction. Both IBM and MicroFocus, the two major COBOL vendors, offer data interchange definitions. In MicroFocus, I used the COBOL PIC 99 format (character number format) for those places I needed to exchange data with Java. Not very advanced, but the interface I needed was mostly text and limited numerics. What types of decimal data do you need to support? Standard COBOL are character (Pic 999) as above (in ASCII x’30’-x’39’) and PIC 999 COMP-3 (Packed decimal). Packed decimal is not supported directly by Java. COBOL / JAVA does directly support BINARY integer.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.