Example of redefines clause, COBOL Programming

Example of Redefines clause:

This illustration describes a sales record that may either contain the total amount of sale or the quantity (QTY) and UNIT-PRICE. The aim of such description may be to have two types of records and their types may be determined from the data item named SALES-TYPE. Based on some predetermined values of SALES-TYPE the record will be interpreted in one of the two forms, Note that the SALES-BY-UNIT and TOTAL-SALES refer to the similar storage space. They actually represent two different mappings of the similar storage region.

The REDEFINES clause as explained above is quite common in use. Though, the clause may be simply used for the aim of conservation of storage space possibly in the working-storage section. In such situations two records having no meaningful connection between them can also be used to share similar storage space provided both of them are not used in the program concurrently. The syntax of the REDEFINES clause is as shown below:

Level-number daa-name-1 REDEFINES data-name-2 

 

Posted Date: 10/17/2012 7:40:50 AM | Location : United States







Related Discussions:- Example of redefines clause, Assignment Help, Ask Question on Example of redefines clause, Get Answer, Expert's Help, Example of redefines clause Discussions

Write discussion on Example of redefines clause
Your posts are moderated
Related Questions
Rules of read statements: The next record is identified according to the rules as shown below: (i) Whenever the READ NEXT statement is the initial statement to be executed

Record Description for the Variable-length Records: When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 f

Illustration of nested if statement: Consider the nested sentence which is as shown below: The IF-ELSE pairs in this sentence can be detected by applying the rule whic

PROGRAM FOR MULTIPLY VERB: We have to write a simple program to elaborate MULTIPLY verb. You can also use the edit characters in the program. Identification division. Pr

Example of Level numbers - cobol programming: To explain the hierarchical structure introduced above, the concept of the level number is employed in COBOL. The most broad

Direct Organization: Besides the relative or indexed organization, also a direct access file can be designed to have what is termed as direct organization.  In this organizati

Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an

Evaluate is like a case statement & Evaluate  stamenet can be used to replace nested Ifs. The difference b/w EVALUATE and case is that there is no 'break' is required for EVALUATE

Display control verbs in Cobol

WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us