How would the number +1234 be stored if a PIC clause of
PICTUREs9(4) comp-3 were used?
Answers were Sorted based on User's Feedback
Answer / rama krishna
It will be stored as follows:
01 23 4C
This is only internal storage representation. But if you
display the variable then you will see 1234 not even '+'.
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / veni
A mistake in answer 2.
It will be stored as follows:
12 34 C
2nd half of the 3rd byte will be left blank.
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / suputhru
9(4) comp-3 takes 3 byets
each digit takes half byte.
-- -- -- 3bytes
numeric alignment is right to left <-----
first sign will store in half byte right. right.
c
-- -- --
then next 4 will store.
4c
-- -- -- like that
01 23 4c
-- -- -- will store.
Fonda is sign will store right most half byte.
-SK.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / santosh khot
The comp-3 Variables are called packed decimals the values
internally stored in two digits in single byte and 0.5 byte
stores the Sign ie -or + so for ur Question S9(4) Comp-3
takes 3 bytes of space
1234 will occupy Two bytes and Sign takes 0.5 bytes
| Is This Answer Correct ? | 4 Yes | 3 No |
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What is SDSF?
what is the difference between implicit and explicit scope terminator with example?
Under which scenario you would go for a static call as opposed to dynamic call?
what is qualification on occurs clause?
is it possible to pass an SQL query inside a jcl which is inside a cobol program?
why do u need inspect verb?
)what is retrieve?
what is the purpose of linkage section?
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 are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc