Example of redefines clause, COBOL Programming

Assignment Help:

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 

 


Related Discussions:- Example of redefines clause

Use of evaluate statement, Evaluate is like a case statement & Evaluate  s...

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

#title.cobol help , we have input file ,record layout is EMP ID (6 char) , ...

we have input file ,record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input file

Picture specification - picture clause, PICTURE specification: The siz...

PICTURE specification: The size of a group item is equivalent to the total of the sizes of all the subordinate elementary items. The group item class is alphanumeric. The i

Conditions-name condition, CONDITIONS-NAME CONDITION:   The condition...

CONDITIONS-NAME CONDITION:   The condition name is an entity which itself is a condition and these can have either a true or false value. Though, a condition name cannot be d

Example of sign condition , Example of Sign condition: The illustratio...

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I

Rules for simple sort verb, Rules for Simple sort verb: The work file ...

Rules for Simple sort verb: The work file is to be defined by a sort elaboration entry (SD entry).The format of SD entry is as shown below. The rules below should be taken

Fd entry for variable-length records, FD Entry for variable-length Records:...

FD Entry for variable-length Records: The RECORDS CONTAINS and BLOCK CONTAINS clause are quite dissimilar in the case of files with variable- length records. The syntax of the

Start statement - indexed files, START STATEMENT: The START statement ...

START STATEMENT: The START statement places the files to the initial logical record whose record key satisfies the condition specified by the KEY phrase. The access mode shoul

Subscript and index, What is the difference between subscript and index

What is the difference between subscript and index

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd