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

Arrays in COBOL/400

2 Answers   Polaris,


Trying to help a friend... How do you code screen I/O without a DDS? I know it can be done, because for a short time, I worked for a company that did it. It was just too long ago for me to remember what was involved.

1 Answers  


why icetool be used in programmer view?

0 Answers  


How u detect record is locked in Cobol/400 ? Wat is the solution for that ?

2 Answers   CGI,


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

0 Answers  






write a cobol program to display prime numbers between 1 to 100?

5 Answers   Cap Gemini, NISA,


how array can be declare in cobol?

6 Answers  


What is sort? And its syntax?

0 Answers  


what is redefine and its syntax?

6 Answers   HCL,


How we can update data area in cobol 400 program?

12 Answers   Accenture,


It's possible use %TRIM statement like rpgile?

2 Answers  


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  


Categories