KR editions 55 to 57
KR-55 : COMPs in COBOL
We tend to come across COMP, COMP-3 etc. very frequently in mainframes. Some facts:
Food for thought: Why is it that when we view a file in HEX mode, comp-3 formats are readable?
KR-56 : More COBOL COMPs!
What's a COMP/ Binary format?
KR-57 : HEX Format
What's HEX format? HEX or hexadecimal format is similar to the decimal system except that each position can represent a maximum value of 15 (in decimal it's 0 to 9; in hexa it's 0 - F; F equals decimal 15). And to convert a decimal number to hexaformat is pretty similar to what we saw for decimal to COMP-3 conversion (and each hexa digit occupies 4 bits/half a byte); Or in other words, let's say we have a file with the byte: 0001 0010 When we open this file in HEX mode (just type HEX ON on the command line); the screen would show: 12 (1 in hexa is 0001 and 2 in hexa is 0010). Well, now you should know the reason why a comp-3 is viewable in HEX ON mode; if you aren't clear; then take a small decimal number; convert it into comp-3; and then you'll be clear.
Go back to the main contents page
Copyright © 2020 Sethu Subramanian All rights reserved. Reach me via email at ssbell @ gmail.com