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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which division and paragraphs are mandatory for a COBOL program?

705


Name some of the examples of COBOl 11?

2673


How do you reference the fixed block file formats from cobol programs

696


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

689


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

639






What is the LINKAGE SECTION used in COBOL?

885


What is the difference between binary search and sequential search?

634


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

668


Which mode is used to operate the sequential file?

658


How many bytes S(8) comp field occupy and its maximum value?

1624


How do you reference the following file formats from cobol programs?

691


What is Pic 9v99 Indicates in COBOL?

716


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

809


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

408


How to use the same COBOL program in Batch and CICS on lines? explain with an example

1910