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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define a variable of comp-1 and comp-2?

703


Write the code implementing the perform … varying.

646


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

720


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1523


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

1637






How to know whether the module is dynamical or statistical?

656


how to convert the recors form vsam file to db2 table tru file aid

2763


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

421


Which Search verb is equivalent to PERFORM…VARYING?

685


How can you get the ksds file records into your cobol program?

644


What is the Purpose of Pointer in the string?

643


What is the problem of ordered sequential files access?

702


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

914


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

710


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

720