Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"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).



That'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: