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



How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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 ?    23 Yes 2 No

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

Answer / elite group

20 Bytes

Is This Answer Correct ?    11 Yes 4 No

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

Answer / madhu

A - 2
B - 7
C - 4
D - 3
E - 2

Total 18 bytes.

Is This Answer Correct ?    5 Yes 9 No

How many bytes will be allocated for the following record description entries? 01 REC-A. ..

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

Post New Answer

More COBOL Interview Questions

Write a cobol program making use of the redefine clause.

0 Answers  


What is 77 level used for ?

12 Answers   IBM, iGate,


Explain what you understand by passing by value.

0 Answers  


HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER

7 Answers   Patni,


Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.

4 Answers   TCS,






HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?

2 Answers   Cap Gemini,


what is the maximum error code in mainframe

2 Answers  


What is perform what is varying?

0 Answers  


Explain about different table spaces.

0 Answers  


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

0 Answers  


HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?

1 Answers  


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

0 Answers  


Categories