how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?

Answer Posted / shiva

COMP1-IT OCCUPIES 4 BYTES TO STORE UP TO 18 CHARACTERS
COMP2-IT OCCUPIES 8 BYTE TO STORE UP TO 18 CHARACTERS
COMP3-IT OCCUPIES HALF BYTE FOR EACH CHARACTER AND HALF BYTE
FOR SIGN...FOR ODD DATA LENGTH SO IT OCCUPIES
(15/2=7.5)+(1/2)=7.5+0.5=8 BYTES.

Is This Answer Correct ?    21 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Have you used comp and comp-3 in your project? And how?

2087


What is link edit in cobol?

858


What the difference is between continue and next sentence?

751


What is rmode(24)

766


In COBOL programming, what is PERFORM? What is VARYING?

755






What are the cobol coding sheets?

745


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

813


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2034


What is the LINKAGE SECTION used in COBOL?

1040


What is the Purpose of POINTER Phrase in STRING command in COBOL?

845


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

1745


What is the Purpose of Pointer in the string?

721


Name the sections present in data division.

793


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

2007


Difference between cobol and cobol-ii?

821