what is the advantage of using redefines instead of
delaring the variables ?

Answers were Sorted based on User's Feedback



what is the advantage of using redefines instead of delaring the variables ?..

Answer / kavithachandrashekar

Redefines is basically used to occupy same same storage space for different data items.In this case if we declare new variable then there is wastage of memory

Is This Answer Correct ?    4 Yes 0 No

what is the advantage of using redefines instead of delaring the variables ?..

Answer / m r reddy

--Redefines is used to re-use the storage space irrespective of the data type.
--Using redefines more than one field can re-use the same memory.

Ex: 01 a pic x(5) value 'xyz12'.
01 b redefines a pic x(3).

Here a=xyz12 value is stored and
b=xyz value is stored. B is reuse the A's Memory

Is This Answer Correct ?    1 Yes 0 No

what is the advantage of using redefines instead of delaring the variables ?..

Answer / deepak kumar

redefines saves the memory by referring the same memory location by other data items.

Is This Answer Correct ?    1 Yes 0 No

what is the advantage of using redefines instead of delaring the variables ?..

Answer / sriram

redefines is a clause which is used for predefined storage space for other variables without wastage of space.

Is This Answer Correct ?    0 Yes 0 No

what is the advantage of using redefines instead of delaring the variables ?..

Answer / joshin

redifine will used to change the pic clause of already
declared variable.

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More COBOL Interview Questions

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 the difference between perform … with test after and perform … with test before?

0 Answers  


In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,


How do you code Cobol to access a parameter that has been defined in JCL?

3 Answers  


What is sqlca and why is it needed in any cobol-db2 program?

1 Answers  






What is ASKTIME, SUSPEND

1 Answers   IBM,


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?

6 Answers   Xansa,


what is difference between the sysabend and userabend?

2 Answers  


In COBOL programming, what is PERFORM? What is VARYING?

0 Answers   CDC,


what is the default print format? in cobol

3 Answers   HSBC,


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1 Answers  


Categories