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 |
)what is retrieve?
why 02 level number can't be use as a separate level number like 01 or 77 ?
how can you identify wheather the program is using search or search all in the cobol program?
How to Write the RESTART Logic Using COBOL?
4 Answers GalaxE, L&T, Syntel, TCS,
i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ ' 05 WS-B REDEFINES WS-A 10 WS-B1 PIC X(10). 10 WS-B2 PIC 9(10). 10 WS-B3 PIC X(10). If I Display B1, B2 and B3 respectively, what is the value displayed in B2
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
A table has two indexes defined. Which one will be used by the SEARCH?
What is CALL statement in COBOL?
Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.
given the following piece of code: CALL SUB-PGM USING A, B, C. CALL SUB-PGM USING A, C, C. (a) Both CALL statements will always produce same result. (d) Both CALL statements may produce different result. (c) Compile-time error because SUB-PGM is a dataname. (d) Compile-time error because A, B, C are used twice.
How does IDMS communicate with CICS?
how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........