what is redefine and its syntax?

Answer Posted / srinivas yadav

-> It is used to reuse the storage space.

example 1:

01 A PIC X(5) VALUE 'SRINU'
01 B PIC X(5).
PROCEDURE DIVISION.
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.
1) REDEFINE
2) REDEFINING FIELD.
-> The redefining field can be declared irrespective of
data types.
-> 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.

thanking u,
urs srinivas.

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to detect record is locked in cobol/400? What is the solution for that?

529


Explain the output procedure?

584


Explain how to detect record is locked in cobol/400? What is the solution for that?

537


How to detect record is locked in cobol/400?

544


What are fillers?

535






Explain how to update data area in cobol 400 program?

583


What are the types of perform?

578


Explain the difference between search and searchall?

518


Define redefine?

564


Explain the difference between comp & comp-3?

549


seqence numbers in cobol

2668


What is redefine?

562


I like to know if possible to use %TRIM or any statement with prefiv "%" like RPG ile programs. thanks

2071


Define perform?

526


Explain the input procedure and output procedure?

526