How many bytes will be allocated for the following record
description
entries?
01 REC-A.
05 A PIC S9(4).
05 B PIC XXXBXXX.
05 C PIC ____9.99.
05 D PIC S9(5) COMP-3.
05 E PIC 9(3) COMP.
Answers were Sorted based on User's Feedback
Answer / khamuruddin
05 A PIC S9(4). = 4
05 B PIC XXXBXXX. = 7
05 C PIC ____9.99. = 4
05 D PIC S9(5) COMP-3. = 3
05 E PIC 9(3) COMP. = 2
-------
20
-------
| Is This Answer Correct ? | 24 Yes | 2 No |
Answer / ezhil_18
@ above
COMP3 data require always requrie n+1/2 bytes. here 5+1/2
takes only 3 bytes not 4 bytes.
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / raj
05 A PIC S9(4) -> 4
05 B PIC XXXBXXX -> 7
05 C PIC ____9.99 -> 4
05 D PIC S9(5) COMP-3 -> 3
05 E PIC 9(3) COMP -> 2
SO TOTAL OF 20 BYTES
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vijay
05 A PIC S9(4) -> 5 (BY CONSIDERING ONE SIGN BIT)
05 B PIC XXXBXXX -> 7 ( AS YOU ALL KNOWS ABOUT THIS)
05 C PIC ____9.99 -> 4 (SPACE AND 9V99=9(3))I THINK
05 D PIC S9(5) COMP-3 -> 3 ((5/2)+0.5)FOR ODD NUM WE HAVE
CONSIDER ONE 1/2 BYTE ONLY=0.5)
05 E PIC 9(3) COMP -> 2 (9(1) TO 9(4)=HALFWORD=2BYTES)
(9(5) TO 9(9)= WORD= 4 BYTES)
(9(10) TO 9(18)= FULLWORD=8BYTES)
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / suresh kumar
sorry to post the last answer, I would like to go for 24
bytes.
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / guest
y there is soo much confusion.. plz mention correct ans..
else it will confuse the readers.. :(
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / priyanka
I think t will be 25 since
05 A PIC S9(4). - 5 :4 + 1 sign byte
05 B PIC XXXBXXX. - 7
05 C PIC ____9.99. - 8
05 D PIC S9(5) COMP-3. - 3
05 E PIC 9(3) COMP. - 2
__________________________________________
Total = 25 bytes
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / raj
05 A PIC S9(4) -> 4
05 B PIC XXXBXXX -> 7
05 C PIC ____9.99 -> 4
05 D PIC S9(5) COMP-3 -> 4
05 E PIC 9(3) COMP -> 2
SO TOTAL OF 21 BYTES
| Is This Answer Correct ? | 0 Yes | 4 No |
Difference between cobol and cobol-ii?
how do you reference the variable unblock file formats from cobol programs
Whtz the specialty of 77 level number ?
Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?
7 Answers Bank Of America, Mind Tree,
can we use 77 level no for Redefines?if we use give an example?
What is the difference between Call and a Link?
plz,could any one tell me? what about EBCDIC in cobol?briefly?
can we read in input the file with a variable length ? please , how ..could you help me ?
How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.
What is normalisation?
Write the code implementing the perform … varying.
What is amode(31)