What is the difference between comp and comp-3 usage?
Explain other COBOL usage?s.

Answers were Sorted based on User's Feedback



What is the difference between comp and comp-3 usage? Explain other COBOL usage?s...

Answer / elite group

Comp -- binary form
Comp-3 Packed Decimal

Usages are:
Display: Default it occupies the number of bytes is equal
to the size of the data-item
Comp -- Binary Number of bytes is equal to the size of the
data-item
Comp-1 -- 4-Bytes no pic clause is required
Comp-2 -- 8-byted no pic caluse is required, Double
precision
Comp-3 -- Packed Decimal Number of bytes is
(n+1)/2 -- if n is odd
(n/2)+1 -- if n is even
Comp-4 --- Same as Comp

Is This Answer Correct ?    57 Yes 14 No

What is the difference between comp and comp-3 usage? Explain other COBOL usage?s...

Answer / cauvitha

comp - used for binary representation. To make the calculations faster. it can have S and 9.
Memory usage is
s9(1)-s9(4) - 2bytes
s9(5)-s9(9) - 4bytes
s9(10)-s9(18) - 8bytes

===

comp-3 - used to store packed decimal values. Stores comparitively more values than comp. It can have S, 9, V.

Memory usage is
n/2 + 1 (Even)
n+1/2 (odd)

Is This Answer Correct ?    24 Yes 4 No

What is the difference between comp and comp-3 usage? Explain other COBOL usage?s...

Answer / sultana

Usage Clause :COMP
Binary representation of data item.
PIC clause can contain S and 9 only.
S9(01) – S9(04) Half word.
S9(05) – S9(09) Full word.
S9(10) - S9(18) Double word.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More COBOL Interview Questions

How to recover a deleted source physical file from library?

1 Answers   HCL,


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

0 Answers   IBM,


In INITIALIZE what is Repalcing Word will do

1 Answers   CTS,


What is COMP-1? COMP-2?

4 Answers   CitiGroup,


What is the difference between comp and comp-3?

0 Answers  






What are the two search techniques ?

2 Answers   iGate,


when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible

1 Answers   Patni,


What the difference is between continue and next sentence?

0 Answers  


IF I mention stop run in CICS what happens?

0 Answers   IBM,


What will happen if we generate GDG (+2) version without generating (+1) version?

2 Answers   IBM, T systems,


what is the difference between Plan & package?

1 Answers   IBM,


What is Pic 9v99 Indicates in COBOL?

0 Answers   SwanSoft Technologies,


Categories