3 ms·
Except in COBOL, data types are decimal, which means that whatever datatypes you choose to use in a modern language will not work the same as they do in COBOL.
by lokedhs 5y ago
Except in COBOL, data types are decimal, which means that whatever datatypes you choose to use in a modern language will not work the same as they do in COBOL.
Also consider that the COBOL datatypes are directly represented in the underlying storage, so whatever format you decide to represent a value in in the code is the same format that will be used for external communication.
If you want to retain compatibility with COBOL, you're probably going to need a COBOL-compatible numeric library in whatever language you're using. at least if you want to just reimplement the original code.