which is better comp or comp-3 in terms of memory
utilization?

Answers were Sorted based on User's Feedback



which is better comp or comp-3 in terms of memory utilization?..

Answer / saravanan s

See Meenakshi,It is depends on the Requirement,

So the Conclusion is

Take a look on the table

COMP COMP-3
(in bytes) (in bytes)

S9(01) 2 1
S9(02) 2 2
S9(03) 2 2
S9(04) 2 3
S9(05) 4 3
S9(06) 4 4
S9(07) 4 4
S9(08) 4 5
S9(09) 4 5
S9(10) 8 6
S9(11) 8 6
S9(12) 8 7
S9(13) 8 7
S9(14) 8 8

like that.........

Cheers,
Saravanan

Is This Answer Correct ?    16 Yes 1 No

which is better comp or comp-3 in terms of memory utilization?..

Answer / ipl

comp-3

Is This Answer Correct ?    16 Yes 5 No

which is better comp or comp-3 in terms of memory utilization?..

Answer / santy

COMP is better that COMP-3 in terms of memory utilization.

check out below examples.

COMP COMP-3
(in bytes) (in bytes)


S9(04) 2 3
S9(08) 4 5
S9(09) 4 5
S9(10) 8 6
S9(11) 8 6
S9(12) 8 7
S9(13) 8 7
S9(14) 8 8

hope it is useful.

Is This Answer Correct ?    7 Yes 4 No

which is better comp or comp-3 in terms of memory utilization?..

Answer / ravi kiran

for lower boundaries comp is better , for higher boundaries
comp-3 is better.
in real time mostly comp3 is used

Is This Answer Correct ?    2 Yes 0 No

which is better comp or comp-3 in terms of memory utilization?..

Answer / guest1

COMP values are stored as Binary format. So it is good to
use COMP.

Is This Answer Correct ?    2 Yes 1 No

which is better comp or comp-3 in terms of memory utilization?..

Answer / i go crazy

COMP uses less memory compared to COMP-3 at word boundaries.
Ex: s9(04) COMP - 2 bytes.
s9(04) COMP-3 - 3 bytes.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More COBOL Interview Questions

In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?

5 Answers  


How to delete leading spaces/blank in COBOL ? Example:- 01 data-name-1 pic x(220) " English is a language". I would like to delete leading spaces.

7 Answers   Financial Services,


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.

3 Answers  


How much salary you are expecting? If they ask in an interview, what we have to tell?

6 Answers   Tech Mahindra, Wipro,


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

0 Answers  


What is a SSRANGE and NOSSRANGE?

0 Answers  


Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY 'MAIN-PARA' PERFORM SECTION-A. STOP RUN. SECTION-A. PARA-A1. DISPLAY 'SECTION A PARA A1'. PARA-A2. DISPLAY 'SECTION A PARA A2'.

4 Answers  


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


if one main program ,n -subprograms are then which call you follow ?why reasonuhg

4 Answers   UHG,


how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please

2 Answers  


Categories