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
Illustration of Multiply verb: (a)  MULTIPLY A BY B. In this situation the value of A & B will be multiplied and the product will be stored in B.  The decimal point locatio

FILE-CONTROL paragraph for the relative files: The normal format for the SELECT clause for a relative file is as shown below. SELECT  file-name  ASSIGN  TO  implementor-nam

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

GO TO, STOP RUN: The GO TO verb is used to completely transfer the control to elsewhere in the program. Its form is as shown below: GO TO procedure-name As a result o

PROGRAM FOR IF -ELSE: We have to write a program to check whether the given number is ODD or EVEN. You can use IF..ELSE. Identification division. Program- id. IfElse.

Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il

OCCURS CLAUSE - PROGRAM: We have to write a program to demonstrate the occurs clause. Get names of the students and show them on the screen.  identification division.

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

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma