Sure. Packed decimal format is used in COBOL to store numbers in half the number of bytes. Don't feel bad, I just learned what packed decimal format was when I couldn't read the number information in a mainframe output file.
For example, if I have the number 12345, it would be stored as the following hex sequence: 12 34 5C. In the file, the hex values are shown as all the ASCII characters that you could ever ask for.
I hope this helps (and I hope that this is the proper understanding).
What does the C in 12 34 5C mean? I thought 12345 would be represented by hex 01 23 45. How would 123456, -12345 and -123456 be represented? Here's a function which may be helpful. You will have to modify it to handle the "C".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.