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

In which area will you utilize 88 level items in cobol?

0 Answers  


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  


i need a program by giving input as a abcd in any randem order but i need a output as 1234 related to abcd. i.e,. a for 1,b=2,c.....etc..

5 Answers   IBM,


How to retrive the 9th records out of ten records using the cobol program ?

3 Answers   UST,


I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.

1 Answers  






How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp

3 Answers   CTS,


01 x pic s9(8) comp. How will the following value be internally allocated '18787'

4 Answers   Steria,


how to transfer the file from pc to mainframe??

4 Answers  


what is the difference between Plan & package

3 Answers   IBM,


in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......

2 Answers   IBM,


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,


Categories