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

how can we get current dat and time thru cobol pgm

3 Answers   DELL,


can we use variable picture clause as xx.99 in cobol.

3 Answers  


Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $

4 Answers  


Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 10 bytes . There should be some difference between two allocations ? Thanks krishna chaitanya

2 Answers   CSC,


what is search and searchall?what is the diffrence between them?give an best example?

3 Answers   BirlaSoft,






I have PS flat file with 14 records. I want to read from 4th to 9th record and want to write those 6 records (4th record to 9th record) to another PS file (output file). there is no key defined in the input file. I just want read a certain Consecutive records. can any one please give me the procedure division Coding for this. I have coded the below coding but the READ-PARA is performing only 1 time even though I have 14 records in my input file (i.e FILE-1): PROCEDURE DIVISION. A000-SECTION. MOVE 0 TO I. OPEN INPUT FILE-1. IF CHECK-KEY1 > 0 DISPLAY "OPEN ERROR FOR FILE-1, CODE IS:" CHECK-KEY1 END-IF. OPEN EXTEND NEWFILE-1 IF CHECK-KEY3 > 0 DISPLAY "OPEN ERROR FOR NEWFILE-1 COD IS" CHECK-KEY3 END-IF. PERFORM READ-PARA THRU EXIT-PARA UNTIL EOF-REC = 'YES'. DISPLAY " FINALLY OUT OF LOOP" CLOSE FILE-1 CLOSE NEWFILE-1 STOP RUN. READ-PARA. ADD 1 TO I READ FILE-1 AT END MOVE 'YES' TO EOF-REC IF I > 3 AND < 10 PERFORM WRITE-PARA ELSE DISPLAY "NOT IN RANGE" END-IF. EXIT-PARA. EXIT. WRITE-PARA. WRITE NEW-REC FROM FILE1-REC.

8 Answers   IBM,


what will happen if i give program name and member name as different? program runs successful or w'll abend?

5 Answers   CTS,


what is linkcard in cobol?

1 Answers   TCS,


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


I have a sequential file. How do I access a record in this sequential file randomly in my program ?

8 Answers   CGI, Xansa,


Can you please let me know the centre name of INS certification in Kolkata.

0 Answers  


What do you understand by psb and acb?

0 Answers  


Categories