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

Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?

4 Answers  


what is the difference between Normal vaiable and comp variable.

5 Answers   DELL,


SIGN TRAILING SEPARATE field occupy ?

3 Answers  


What is the size of s9(19)comp3? explain

8 Answers  


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  






How do u sort the table for Search ALL? Is it only using ASCENDING KEY IS statement in occurs clause? If the data is input in non ascending order, will the ASC KEY IS automatically sort the data? or will it throw compile time error?

1 Answers   CTS,


What is XDC ?

3 Answers   Cap Gemini, IBM,


how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)

6 Answers  


if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.

1 Answers   IBM,


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


how to know that the file has 300 records how to acess it?

0 Answers   Hewitt, TCS,


Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS

2 Answers  


Categories