Answers were Sorted based on User's Feedback
Answer / veena
REDEFINE specifies the same memory or storage area is
refered by different data items....dat means the starting
positon of memory will b the same...
we can redefine a data item into any number of times...the
level numbers should be same..we cant redefine level numbers
|Is This Answer Correct ?||54 Yes||6 No|
Answer / abdul
redefine: It is used to reuse the storage space irrespective
of datatypes.That is more than one field can reuse the memory.
redefines clause can be used with level numbers
01 to 49.we redefine the fields only which have same
group,samelevelnumbers,and immediately follow the field.
|Is This Answer Correct ?||29 Yes||4 No|
Answer / srinivas yadav
-> It is used to reuse the storage space.
01 A PIC X(5) VALUE 'SRINU'
01 B PIC X(5).
MOVE A TO B.
here we need 10 bytes of memory but in case of redefines
we need only 5 bytes of memory.we can above code by using
redefines like follows
01 A PIC X(5) VALUE 'SRINU'.
01 B REDEFINES A.
-> we can use 01 to 49 level numbers only.
-> in redefines we can use picture clause where as in
renames no need to use picture clause.
-> we have two types of REDEFINES.
2) REDEFINING FIELD.
-> The redefining field can be declared irrespective of
-> The redefining field length may be is equal,lessthan or
greater than the redefined field.
-> The redefining field should be coded with the same
level number,same group.
-> Immediately followed the redefined or group item.
-> A redefined item cannot redefined.
I think dis is enoug for redefines.
|Is This Answer Correct ?||14 Yes||4 No|
Answer / venkatesh
Allows to Share the Same Main Storage Area to Refer to
Different Data Description. The Idea is to Use the Main
|Is This Answer Correct ?||13 Yes||3 No|
Answer / siri
REDEFINES :- IT IS USED TO REUSE THE SPACE FROM THE FIRST BYTE
*REDEFINING AND REDEFINING FIELDS ARE MUST BE AT SAME LEVEL
*REDEFINING THE MEMORY MUST BE SAME OR SORTER..
*SIZE OF THE REDEFINE AND REDEFINING FIELDS NEED NOT BE SAME..
*MULTIPLE REDEFINES ARE POSSIBLE....
SYNTAX :- WORKING-STORAGE SECTION.
01 A PIC X(10) VALUE'SIRIANITHA'
01 B REDEFINES A PIC X(2)
|Is This Answer Correct ?||1 Yes||1 No|
Answer / unknown
REDEFINE is a Cobol Verb.
It is similar to RENAME Verb.
It uses the same WORKING-STORAGE memory of a data name
With another data name programmer want instead.
01 WS-NAME PIC x(15).
01 WS-AGE PIC 99.
05 NAME REDIFINES WS-NAME.
|Is This Answer Correct ?||29 Yes||63 No|
what is PERFORM? and its types?
What is the actual use of fillers?
Arrays in COBOL/400
What is the syntax of sort?
what is the difference between comp & comp-3?
Code how to read 5th element of the array?
How we create file in COBAL400
i have two programs 1.cobol program 2.copy book program can i move bouth program in to the production or single single program?
what is INPUT PROCEDURE and OUTPUT PROCEDURE?
Explain the syntax of redefine?
How can i change the below code in SQL to cobol/400? EXEC SQL SELECT COUNT(*) INTO : WS-COUNT FROM Db file WHERE Field 1 = : WS-VAR AND Field 2 = : WS-USERID END-EXEC * EVALUATE TRUE WHEN SQLCODE = +000 MOVE WS-COUNT TO Copybook field WHEN SQLCODE = +100 MOVE ZEROES TO Copybook field