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

what is S04E error in jcl?

11 Answers   IBM, L&T,


wirte a pgm in using files in which we hav 10 ,20,30 40...100 records in inputfile and i want them to be send to outputfile in reverse order. PLZ HELP ME OUT .........THIS IS A RECENT QUESTION IN IGATE..

5 Answers   iGate,


how to display the dataset information?

2 Answers  


Minimum how many Number of Paragraphs are there in ID- Divison?

7 Answers   IBM,


How many variables can be declared in w-s section.?

2 Answers  






what are the steps to sort in a cobol program?

2 Answers   Patni,


Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?

4 Answers  


In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)

3 Answers   Keane India Ltd,


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,


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  


Identify the invalid dataname from the following: (A) savings-account (B) annual-allocation-for-overhead (C) samount250 (D) 12demand

4 Answers   TCS,


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

0 Answers  


Categories