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

How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2473


how can i see junk values in dclgen or in hostvariable of comp ?

3003


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1213


Explain what you understand by passing by value.

1157


Write some characteristics of cobol as means of business language.

1145


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

1095


In which area will you utilize 88 level items in cobol?

1165


Give some examples of command terminators?

1261


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9106


i need a small 3d program using inline and outline.

2212


Define static linking and dynamic linking.

1195


What are the pertinent COBOL

2570


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2473


What is the difference between comp and comp-3 usage?

1201


Write a program to explain size error.

1203