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



How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?..

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

How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?..

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

How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?..

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

How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?..

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

How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?..

Answer / guest

ans#2 is correct

Is This Answer Correct ?    2 Yes 1 No

How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?..

Answer / djayaramudu

0c 12 34

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More COBOL Interview Questions

Can we call a CICS program from a batch program or viceversa?If so, how?

3 Answers  


How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.

3 Answers  


what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?

4 Answers   IBM,


What is the difference between copy and include in cobol?

1 Answers  


01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy

13 Answers   HSBC,






how do u indetify files succesfully executed or not ?

4 Answers   TCS,


Is It Possible to Update or change in VIEW Mode?

5 Answers   CSC,


input:-AABBCCDDEFGHIIJ output:- ABCDEFGHIJ Here in input we hav the duplicate characters i.e repeating characters.SO we should eliminate the duplicate characters and should display the output in ascending order.

6 Answers  


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

0 Answers  


Describe the difference between subscripting and indexing ?

2 Answers  


What is 66 level number and where it is used in real time by software developers?

2 Answers   ITC Indian Tobacco Company, TCS,


how do u link sub pgm to main pgm ?

2 Answers   TCS,


Categories