Answer Posted / billyboyo
Packed decimal is IBM's method to allow calculation
directly in base-10.
A DISPLAY numeric field might be PIC S9(7).
If you were to try to add 1 to this, the compiler would
convert, in its own work area, this field to a "packed
decimal" field and generate an AP (Add Packed) to do the
addition, then it would convert the field back to DISPLAY
and the correct value would be in your PIC S9(7) field.
Notice that if you had started off with a COMP-3 (packed
decimal) PIC S9(7) you avoid doing two conversions (from
display to packed and from packed to display).
If you have 1234567 in your display field, it looks like
this in HEX "F1F2F3F4F5F6F7". In comp-3/packed decimal it
looks like this in HEX "1234567C", where the C is the sign
(C is positive, D is negative, and F is unsigned).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
example for sub strings ? and refernce modifications whit output pls
What is a SSRANGE and NOSSRANGE?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
Discuss about changing dataset name in proc.
Describe the cobol database components?
How do you reference the fixed block file formats from cobol programs
what is the difference between COBOL2 AND COBOL390?
HOw can I get the negative sign while deduct high value from low value
Name the sections present in data division.
Explain how to differentiate call by context by comparing it to other calls?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is the problem of ordered sequential files access?
What rules are followed by the search verb.