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 / nagarajeswari

output will be 3456

Is This Answer Correct ?    9 Yes 16 No

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

Answer / vishal

allways value & move display from rigt to left or accept
lalue left to riht ans 3456

Is This Answer Correct ?    4 Yes 11 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 aligment from right to left
truncation is in left side
the data type size of y is 9
so the value of y is 000123456

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More COBOL Interview Questions

Explain about Redefines cluse?

3 Answers   iGate,


what are the limitations of Inline Perform?

3 Answers   Zensar,


How many bytes will be allocated for the following record description entries? 01 REC-A. 05 A PIC S9(4). 05 B PIC XXXBXXX. 05 C PIC ____9.99. 05 D PIC S9(5) COMP-3. 05 E PIC 9(3) COMP.

16 Answers   IBM, TCS,


ZEROES and SPACES are _______ constants (a) Figurative (b) Numeric (c) Non-numeric (d) Alphabete

4 Answers   TCS,


In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?

5 Answers  






I have a cobol program with a sub program. How ca i find that it is a dynamic call? or static call..?

3 Answers   HCL, IBM,


can we declare occurs in 01 level?

2 Answers   Temenos,


i have variable record in the 5th, i want to sort from 5th filed ? how ?

2 Answers   TCS,


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  


can anyone explain me the concept of COMP-4 PLEASE??

2 Answers  


What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?

1 Answers  


how can we find total no of records in a file ....is there any utility......?

3 Answers   IBM,


Categories