which is better comp or comp-3 in terms of memory
utilization?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / guest1
COMP values are stored as Binary format. So it is good to
use COMP.
Is This Answer Correct ? | 2 Yes | 1 No |
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 |
how can we get current dat and time thru cobol pgm
can we use variable picture clause as xx.99 in cobol.
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
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
what is search and searchall?what is the diffrence between them?give an best example?
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.
what will happen if i give program name and member name as different? program runs successful or w'll abend?
what is linkcard in cobol?
How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.
I have a sequential file. How do I access a record in this sequential file randomly in my program ?
Can you please let me know the centre name of INS certification in Kolkata.
What do you understand by psb and acb?