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

Answers were Sorted based on User's Feedback



01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / jaganmohanreddy

HAI ALL U R WRITING DIFFERENT ANSWERS BUT THEY ARE ASKING
FOR YYY VALUE IT WONT BE CHANGED IT HAS VALUE OF 123456
BECAUSE ITS PIC CLAUSE IS 9(6) OK THEN DISPLAY YYY IT WIL
DISPLAY 123456 OK ANY DOUBTS

Is This Answer Correct ?    55 Yes 3 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / jaganmohanreddy

answer is 123456

Is This Answer Correct ?    38 Yes 4 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / v@m$i

YYY VALUE NOT CHANGE.
ie 123456

Is This Answer Correct ?    29 Yes 1 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / siba

In numeric number alingment is right to left
truncation is done in left side
the datatype size of y is 6
so value of y is 123456

Is This Answer Correct ?    14 Yes 2 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / adithya

YYY : 123456

XXX : 3456

Is This Answer Correct ?    12 Yes 0 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / gangadhara.m

numeric number alingment is right to left
truncation is done in left side
the datatype size of y is 6
so value of y is 123456

Is This Answer Correct ?    8 Yes 2 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / mahaveer

Here if u display YYY it will 123456
and if u display xxx it will 3456

Hope its clear

Is This Answer Correct ?    4 Yes 0 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / vishal

12345

Is This Answer Correct ?    8 Yes 9 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / vjay

we cannot move yyy to xxx ....see the data length

Is This Answer Correct ?    2 Yes 3 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / v@m$i

OUTPUT:
----------
3456

Is This Answer Correct ?    9 Yes 15 No

Post New Answer

More COBOL Interview Questions

Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.

6 Answers   EDS,


in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?

2 Answers   HSBC,


can you declare redefine in level 01?

8 Answers   Patni,


what is rediffine clause?in what situation it can use?give me real time example?

1 Answers   IBM,


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

0 Answers  






what is the difference between perform varying and perform until

4 Answers   TCS,


) How do you access the migrate the data from production region to development region

1 Answers   IBM,


how we rectify soc7 and soc4 errors in project?

1 Answers   Anaxis, TCS,


What is the difference between a binary search and a sequential search?

10 Answers  


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

0 Answers  


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,


Categories