What is the difference between comp and comp-3 usage?
Explain other COBOL usage?s.
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
What is the compute verb? How is it used?
what happens if we dont close cursor in db2-cobol pgm?
How do u initialize an array?
Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference in C.
What is the problem of ordered sequential files access?
what is difference between the sysabend and userabend?
What is report-item?
I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..
can we declare occurs in 01 level?
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
when SE37 SB37 and sd37 occurs how to increase the volume , primary quantity and secondary quantity?