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 you define a sort file in JCL that runs the COBOL program?
can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.
what is the difference between implicit and explicit scope terminator with example?
What are some examples of command terminators?
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be
) what is the difference between AID and HANDLE AID?
is it mandatory to give data division before procedure division ? wht happens if i give procedure division first thn data division ? reply soon
What care has to be taken to force program to execute above 16 Meg line?
Whtz the specialty of 77 level number ?
what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?
i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me
in cobol perform stmt whether it first checks the condition or not