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
how do you reference the ksds vsam file formats from cobol programs
What is length is cobol?
What are the access modes of START statement?
What is the difference between PIC 9.99 and 9v99 in COBOL?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
how to convert the recors form vsam file to db2 table tru file aid
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
Which is not true about evaluate statement
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the usage of comp fields in cobol?
what is the use of outrecord?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?