6 ms·
"COBOL uses a fixed width character format for all data (yes even for COMP). If you want a four digit number, then you have to use 4 character positions." That
by Per_Bothner 1y ago
"COBOL uses a fixed width character format for all data (yes even for COMP). If you want a four digit number, then you have to use 4 character positions."
That is incorrect. USAGE COMP will use binary, with the number number of bytes depending on the number of digits in the PIC. COMP-1 specifically takes 4 bytes. COMP-3 uses packed decimal (4 bits per digits).
- GartzenDeHaes 1y agoThat's what the specs say, but I found out it actually didn't work that way when I was working on a transpiler, at least for that installation.