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
PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.

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

can we move spaces to numeric field

OPEN STATEMENT: Whenever a READ or a WRITE operation is executed on a file, then it should be open. The opening of a file may be completed with the help of the OPEN verb. With

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

SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various

WRITE statement: The WRITE statement for tape and sequential-disk files has the syntax shown below. WRITE            record-name      [  FROM    identifier   ] As a resu

DISPLAY STATEMENT:   The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co

PROGRAM FOR IF :   We have to write a program to check whether the given number is ODD or EVEN. Identification division. Program- id. Ifst. Environment division.

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem