diffrence between renames and redifnes with examples

Answers were Sorted based on User's Feedback



diffrence between renames and redifnes with examples..

Answer / khasim

We can regroup using RENAMES.

02 MM PIC X(2).
02 DD PIC X(2).
02 YY PIC X(2).
66 DATE RENAMES DD TRRU YY.

We can devide an Element to multiple elements using
REDEFINES.

02 DATE1 X(6).
02 DATE2 REDEFINES DATE1.
05 MM PIC X(2).
05 DD PIC X(2).
05 YY PIC X(2).

This is main defference.
Remaining things all know.

Is This Answer Correct ?    16 Yes 2 No

diffrence between renames and redifnes with examples..

Answer / swathi.k

Redefines are used to reuse the storage space where as
renames are used to regroup the elementary items.

Ex:For redefines
01 A.
02 PIC X(6) VALUE 'SWATHI'.
02 REDEFINES A PIC X(2).
fOR RENAMES
01 A.
02 B PIC X(5).
02 C PIC X(5).
02 D.
03 D1 PIC X(2).
03 D2 PIC X(5).
02 E PIC X(6).
66 GROUP1 RENAMES C THRU E.
2.Redefines are coded with 0 to 49 level numbers where
as renames are declared with 66 level no.
3.pic clause is required for redefines where as pic clause
is not used for renames.

Is This Answer Correct ?    18 Yes 8 No

diffrence between renames and redifnes with examples..

Answer / chaitanya chandana

redefines can use the any level no(0-49)...
but renames uses the 66 level no...
redefine may not perform subsequent to earlier data-item.
rename perform subsequent to earlier data-item.



Plz correct me if any mistake to my answer..

Is This Answer Correct ?    6 Yes 4 No

Post New Answer

More COBOL Interview Questions

SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.

3 Answers   Lehman Brothers,


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

0 Answers  


I want to declare a field with data type Double in my COBOL program. how shall i do that ?

5 Answers  


Hai friends why we need to read a file before re-write a record?

7 Answers   L&T,


how can we get current dat and time thru cobol pgm

3 Answers   DELL,






How do you fetch current date in normal cobol pgm and in cobol-db2 pgm?

3 Answers   Cap Gemini, CTS,


how to check whether the open command of a sequential file is successful? or not?

2 Answers   CSC, IBM,


how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?

2 Answers   TCS,


Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 10 bytes . There should be some difference between two allocations ? Thanks krishna chaitanya

2 Answers   CSC,


) What is the use of IGNORE?

1 Answers   IBM,


what is the diff b/w select stsmt and cursor ?

2 Answers  


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

0 Answers  


Categories