how many bytes does s9(7)COMP-3 field occupies?
Answer Posted / vijayamala
s9(7)comp3
n=7 , (n+1)/2 = (7+1)/2 = 4.
4 bytes will be allocated for this numeric data item.
since comp3 is a packed decimal representation, each byte
can hold 2 data items. which means it 4 bytes can occupy 8
items. In which last item is left for sign digit. So
s9(4)comp3 will have 4bytes allocated & can hold 7 data
item and 1 sign digit in it.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is report-item in COBOL?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
How do you reference the fixed block file formats from cobol programs
how do you reference the variable block file formats from cobol programs
explain sorting techniques in cobol program?
What is the Purpose of Pointer in the string?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What are 77 levels used for?
what is the use of outrecord?
What is the problem of ordered sequential files access?
Name the sections present in data division.
What do you understand by psb and acb?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
How do u write test cases?