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
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
Which mode is used to operate the sequential file?
What guidelines should be followed to write a structured cobol prgm?
What is report-item in COBOL?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
What is the use of intialize verb?
Whats the difference between search & search ALL?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
How you can characterize tables in cobol?
What is the difference between binary search and sequential search?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What are the different rules for performing sort operation?
How to remove 2 duplicate records and copy only one using job control language?
how to move the records from file to array table. give with code example