Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

wht is packed decimal in cobol

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


Please Help Members By Posting Answers For Below Questions

example for sub strings ? and refernce modifications whit output pls

2368


What is a SSRANGE and NOSSRANGE?

1531


I have a File that has duplicate records. I need only those records that occur more than thrice.?

10007


Discuss about changing dataset name in proc.

1294


Describe the cobol database components?

1219


How do you reference the fixed block file formats from cobol programs

1286


what is the difference between COBOL2 AND COBOL390?

3113


HOw can I get the negative sign while deduct high value from low value

2304


Name the sections present in data division.

1310


Explain how to differentiate call by context by comparing it to other calls?

1245


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1309


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1385


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?

2330


What is the problem of ordered sequential files access?

1207


What rules are followed by the search verb.

1196