comp-3 field occupy?

Answers were Sorted based on User's Feedback



comp-3 field occupy?..

Answer / anil prajapati

it will occupy maximum s9(18) comp-3 i.e. 10 bytes

Is This Answer Correct ?    6 Yes 0 No

comp-3 field occupy?..

Answer / ajith

for pic s9(n) comp-3,

it will occupy (n+1)/2 bytes

Is This Answer Correct ?    5 Yes 2 No

comp-3 field occupy?..

Answer / ganesh

It will store INT ((n/2)+1) bytes for PIC S9(n) COMP_3;

Is This Answer Correct ?    3 Yes 1 No

comp-3 field occupy?..

Answer / swamy

Comp-3 fields occupy (n+1)/2 spaces , 1 being the sign

eg: Pic S9(7) COMP-3. Byte size = (7+1)/2 = 4
Pic S9(5)V99 COMP-3. Byte size = (5+2+1)/2 = 4

Is This Answer Correct ?    2 Yes 0 No

comp-3 field occupy?..

Answer / krishna

COMP-3 is hexa-decimal reprasention .the best at lower
boundaries.
If it have size is even it takes (n/2) bytes.
If it have size is odd it takes (n+1/2) bytes.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More COBOL Interview Questions

What are the differences bitween cobol and cobol-2?

1 Answers   Wipro,


how to check whether the open command of a sequential file is successful? or not?

2 Answers   CSC, IBM,


Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.

12 Answers  


there is a file whose ORGANISATION is INDEXED.you want to read the records from the file in RANDOM fashion as well as sequentially.then which of the access mode would you specify? a.SEQUENTIAL b.RANDOM c.DYNAMIC D.ACCESS MODE has nothing to do with it

3 Answers   TCS,


how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,






What is CALL statement in COBOL?

4 Answers  


when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible

1 Answers   Patni,


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

0 Answers  


Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?

12 Answers   T systems, Tech Mahindra,


I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. 05. C PIC X(3). 05. D PIC X(3). 05. E PIC 9(3). IN MY PROG, I HAVE MOVE 1 TO E. DISPLAY A. WHAT WILL BE DISPLAYED AS A RESULT OF THIS? PLEASE EXPLAIN THE ANSWER. THANKS.

7 Answers   Amdocs,


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


Using string statement.Is coding three destination string from one source string possible in one code?or three codes for every destination string of one source string.?thank you

1 Answers   BPL,


Categories