Programs for redefines clause , COBOL Programming

PROGRAMS FOR REDEFINES CLAUSE:

We have to write a simple program to explain the REDEFINES clause at 01 level.

identification division.

program- id. Redef.

environment division.

data division.

working-storage section.

01  a  pic 9(3) value 125.

01  r  pic 9(2) redefines a.

  procedure division.

  p-1.

    display(1 1) erase.

    display(5 5) "Value of r = " r.

    stop run.

Note:  The outcome of the program will be 

                    Value of r = 12.

             This output is arrived by using Redefining the variable a.

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







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

Write discussion on Programs for redefines clause
Your posts are moderated
Related Questions
Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

Data types available in COBOL are given below Alpha-numeric (X), numeric (9), alphabetic (A)

B (Blank Insertion) : The occurrence of a B anyplace in the picture will insert a space character in the edited data. There can be more than one B in the picture. Examples:

/ (Slash Insertion): The edit character slash (/) also termed as virgule or stroke, may appear anyplace in the picture. When used, it will be inserted. More than one slash can

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

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

How do I move a single QUOTE to a field or set the value clause? "''" does not work?

Abbreviation: The Consecutive relational conditions in a compound condition can be abbreviated in many cases as shown: (i) When the subjects in the consecutive relational c

Structure of a COBOL Program: Every COBOL program should have the 4 divisions in the order in which they are specified below: 1. Identification division 2. Environment D