Your host:
Stephen Chapman
Stephen Chapman

Difference between RENAMES and REDEFINES

Question:What is the Different between REDEFINES clause and RENAMES clause in COBOL.
anonymous

Answer: The RENAMES clause does not use any extra space within the program as all it is doing is supplying a replacement name for use in a data definition attached to the program via a COPY statement. This allows the same code to be copied multiple times and given different names. All of this is resolved by the compiler and does not affect the size of the resultant program.

The REDEFINES clause is used to provide a different data definition for the same data area. In this instance both of the names supplied are accessible to be used in the PROCEDURE DIVISION. As such the code generated by the compiler may be different depending on which of the names that is used.

go to top

Add to del.icio.us

Personal Loan - Loans - Homeowner Loans - Bad Credit Loans