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
Which division and paragraphs are mandatory for a COBOL program?
Name some of the examples of COBOl 11?
How do you reference the fixed block file formats from cobol programs
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?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What is the LINKAGE SECTION used in COBOL?
What is the difference between binary search and sequential search?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
Which mode is used to operate the sequential file?
How many bytes S(8) comp field occupy and its maximum value?
How do you reference the following file formats from cobol programs?
What is Pic 9v99 Indicates in COBOL?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
How to use the same COBOL program in Batch and CICS on lines? explain with an example