using redefine can you redefine lower variable size to
higher variable size?

Answers were Sorted based on User's Feedback



using redefine can you redefine lower variable size to higher variable size?..

Answer / santosh mahajan

Yes. Redefines just causes both fields to start at the same
location. For example:-

01 WS-XYZ PIC X(1).

01 WS-XYZ-R REDEFINES WS-XYZ PIC(2).

MOVE 11 TO WS-XYZ-R
DISPLAY WS-XYZ will show 1
DISPLAY WS-XYZ-R will show 11

Is This Answer Correct ?    10 Yes 2 No

using redefine can you redefine lower variable size to higher variable size?..

Answer / snehatechm

YES

Is This Answer Correct ?    5 Yes 1 No

using redefine can you redefine lower variable size to higher variable size?..

Answer / harikumr ch

Syn:Levelnumber dataname-1 redefines data-name-2

The data-name-1 & data-name-2 must be of same size.(From
level 02).Incase of 01 level, the size of data-name-1 must
not exceeds that of data-name-2.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

How do u know what version of cobol u are using?

3 Answers  


I have a sequential file of 100 records. How do I load the records into a two dimensional array ?

3 Answers   IBM, Xansa,


what is difference between the sysabend and userabend?

2 Answers  


01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345.99 to var2. display var1. display var2. what is the output?

2 Answers   IBM,


What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.

2 Answers  






how to pass 100 to s9(4) how r they inserted ?

3 Answers   TCS,


If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and will there be any error becoz of the Negative value

3 Answers   CTS,


How can we find out wether to declare the data items like Integer, Char,Comp? If comp types how can we decide wether it is Comp and Comp3.How it is? Please Explain... Cheers.

1 Answers   Syntel,


Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.

3 Answers   iGate,


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


What is the difference between a binary search and a sequential search what are the pertinent cobol?

0 Answers  


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.

10 Answers   IBM,


Categories