what is the advantage of using redefines instead of
delaring the variables ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Answer / joshin
redifine will used to change the pic clause of already
declared variable.
Is This Answer Correct ? | 2 Yes | 6 No |
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?
What is the difference between perform … with test after and perform … with test before?
In a program, variables are used but no DB2 involved in it. Can you call it as host variables??
How do you code Cobol to access a parameter that has been defined in JCL?
What is sqlca and why is it needed in any cobol-db2 program?
What is ASKTIME, SUSPEND
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length
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?
what is difference between the sysabend and userabend?
In COBOL programming, what is PERFORM? What is VARYING?
what is the default print format? in cobol
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there