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 ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as

PROGRAM FOR PERFORM - VARYING: We have to write a program to elaborate PERFORM ...VARYING Identification division. Program- id. PerfVary. Environment division. Dat

PROGRAM FOR SCREEN SECTION:  identification division.   program- id.   environment division.   data division.   working-storage section.   01  a pic 9(2) value

REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE  record-name  [  FROM      ide

PROGRAM TO DEMONSTRATE SORT VERB: The file for which a record having 2 fields, viz., Account Number and Name is already available. Sort the file based on the ascending order o

PERFORM WITH UNTIL OPTION: The format is as shown below: Illustration:  A) Perform p-3 until i > 5. Here p-3 will be executed whenever i B)  Perform p-2 thru

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.

RENAMES CLAUSE: At times re-grouping of an elementary data items in a record may be essential so that they can belong to the original as well as to the latest group. This is o

Illustration of Search verb: To illustrate the other use of SEARCH verb, assume we wish to search the similar tab to find the number of persons whose deposited amount is more

MULTI-DIMENSIONAL TABLES: The type of table which has been considered above is known as one-dimensional table. Whenever a table is such that each of its elements in turn is a