can u give result for the fallowing example...
05 a pic 9(2)
05 b redifines a pic x(2).
move 'xy' to b.
display a,b.

Answers were Sorted based on User's Feedback



can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / dharma

both a and b haveXY

Is This Answer Correct ?    12 Yes 1 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / santhosh vayathuri

redefines will not check whether is numeric data type or
alphanumeric datatype simply it will display the value what
ever there in the memory . so for this question answer is

a = xy

b = xy

Is This Answer Correct ?    8 Yes 0 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / karthik

a=00
b=xy

Is This Answer Correct ?    14 Yes 9 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / lakshmisudha

it display answer is xyxy
first xy for a and second xy for b.
only b will use same memory area it doesn't consider type of
datatype

Is This Answer Correct ?    4 Yes 0 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / ashok kumar

Dharma,
answer is correct , its both have xy only.

i pratically done that prog

Is This Answer Correct ?    3 Yes 0 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / muttaiah

Dharma, can you give some clarification how a, b will hold
xy.
Thanks in advance.

Is This Answer Correct ?    0 Yes 0 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / shyamala a

SCENARIO 1 :
If we move "XY" TO A then the result will be
1. You will get a compilation warning "** Warning 378 ** Expected digit string as sending operand"
2. display will be Both A and B will have 00.

sCENARIO 2:
iF WE MOVE "xy" TO B then the result will be
1. No compilation/run time error.
2. Display will be both A and B = XY

Is This Answer Correct ?    0 Yes 0 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / neha

a=00
b=xy
because redefines only defines the length of the variables ,not the particular value.

Is This Answer Correct ?    0 Yes 2 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / sathasivam

this ia correct

Is This Answer Correct ?    0 Yes 3 No

can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move &..

Answer / muttaiah

I think it will give soc7 abend because we are moving
char's to numeric field.
can someone explain more clearly on this.
If you have any link regarding this do share with us.

Thanks in advance.

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More COBOL Interview Questions

What is the difference between external and global variables in COBOL?

0 Answers   Winsol Solutions,


What does MAXCC 3 means? It is used in one my codes.

2 Answers   Wipro,


input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.

4 Answers  


what is the size of W-REC in the following 01 W-REC 05 A PIC 9(4)V99 05 B READLINES A 10 C PIC XX 10 D PIC S9(4) 05 E OCCURS 7 PIC ZZ.ZZ 05 F OCCURS 5 10 G PIC ZZ.ZZZ99 10 H OCCURS 3 15 J PIC 9(3) 15 K PIC V99

2 Answers   TCS,


how will u code parm parameter and where pls ?

3 Answers   DELL,






i need a small 3d program using inline and outline.

0 Answers  


In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)

3 Answers   Keane India Ltd,


plz,could any one tell me? what about EBCDIC in cobol?briefly?

1 Answers  


Whats the difference between search & search ALL?

3 Answers   IBM,


Have you used comp and comp-3 in your project? And how?

0 Answers   IBM,


What is the figurative constant in cobol?

1 Answers  


is this below syntax correct? CALL 'subprg' using A,B Please help

2 Answers  


Categories