what is redefine and its syntax?

Answers were Sorted based on User's Feedback



what is redefine and its syntax?..

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
66,88...

Is This Answer Correct ?    54 Yes 6 No

what is redefine and its syntax?..

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

what is redefine and its syntax?..

Answer / 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

what is redefine and its syntax?..

Answer / venkatesh

Allows to Share the Same Main Storage Area to Refer to
Different Data Description. The Idea is to Use the Main
Storage Efficiently.

Is This Answer Correct ?    13 Yes 3 No

what is redefine and its syntax?..

Answer / siri

REDEFINES :- IT IS USED TO REUSE THE SPACE FROM THE FIRST BYTE
ON WORDS....
*REDEFINING AND REDEFINING FIELDS ARE MUST BE AT SAME LEVEL
NOS..
*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

what is redefine and its syntax?..

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.

Syntax.

WORKING-STORAGE SECTION.
01 WS-NAME PIC x(15).
01 WS-AGE PIC 99.
05 NAME REDIFINES WS-NAME.

Is This Answer Correct ?    29 Yes 63 No

Post New Answer

More COBOL400 Interview Questions

01 A PIC 9. 01 B PIC 99V1. 01 C PIC 99. MOVE 1 TO A. MOVE 0.2 TO B. COMPUTE C ROUNDED TO 3/3 + A.

2 Answers  


What is the syntax of redefine?

0 Answers  


Define perform?

0 Answers  


When search all is used in cobol program without sorted input data

3 Answers  


how array can be declare in cobol?

6 Answers  






Explain how to convert 2010/02/11 to m/dd/yyy.. With string and without string if any other method... Code?

0 Answers  


What is sort? And its syntax?

0 Answers  


what is the difference between comp & comp-3?

4 Answers  


What is the syntax of sort?

0 Answers  


What are the types of perform?

0 Answers  


How COBOL helps Mainframe to maintain large records ???

1 Answers   Satyam,


Explain the difference between section, paragraph and sentences?

0 Answers  


Categories