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...


What is the difference between COMP & COMP-3 ?

Answers were Sorted based on User's Feedback



What is the difference between COMP & COMP-3 ?..

Answer / raghunandan modak

COMP is a binary storage format while COMP-3 is packed
decimal format.

For comp-3 you can refer following examples -

Packed Decimal fields: Sign is stored as a hex value in
the last nibble (4 bits ) of the storage.

The actual number of bytes occupied in the file is about
half that. To calculate the number of bytes from the PIC,
add 1 (for the sign) to the total number of digits, divide
by 2, and round up if necessary. For example:

PIC S9(7) COMP-3. Byte size = (7 + 1) / 2 = 4
PIC S9(5)V99 COMP-3. Byte size = (5 + 2 + 1) / 2 = 4
PIC S9(6) COMP-3. Byte size = (6 + 1) / 2 = 3.5,
rounded to 4
Comp-3 fields reserve a nibble for the sign, even
for "unsigned" values, so the following fields are still 4
bytes:
PIC 9(7) COMP-3. Byte size = (7 + 1) / 2 = 4
PIC 9(6) COMP-3. Byte size = (6 + 1) / 2 = 3.5,
rounded to 4.

Is This Answer Correct ?    47 Yes 9 No

What is the difference between COMP & COMP-3 ?..

Answer / vampire

comp has boundaries

01-04 halfword
05-09 fullword
10-18 doubleword
comp is always fast compare to comp3
comp storage is only binary
only using for small data

comp-3 is takes like this

(n+1)/2

it is much powerful than comp when handling huge data
storage is binary and packed decimal

Is This Answer Correct ?    10 Yes 0 No

Post New Answer

More COBOL Interview Questions

What are 77 levels used for?

0 Answers  


) How do u handle errors in BMS macro

0 Answers   IBM,


Define cobol?

0 Answers  


what is call by value and call by reference ?

3 Answers   Infosys, ITC Indian Tobacco Company,


diffrence between renames and redifnes with examples

3 Answers   IBM,


file status 00 is checked after opening the file or reading the file

4 Answers   John Deere,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?

6 Answers   Xansa,


Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.

12 Answers   CTS, Wipro,


What is diff between vsam and db2?what is advantage of db2 over vsam?which is best suited one?

1 Answers   Fidelity,


How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.

5 Answers  


how many bytes do SPPPP999 will store?

18 Answers  


Categories