Programs for redefines clause , COBOL Programming


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.


    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
INPUT-OUTPUT SECTION: This section holds information regarding the files to be used in the program. There are 2 paragraphs in this section- FILE-CONTROL & I-O-CONTROL. The

NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec

PROGRAM FOR CONDITION NAMES: We have to write a simple program to demonstrate Condition names usage.  identification division.   program- id.   environment division.

COMPUTE VERB: The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format i

Display control verbs in Cobol

COBOL Words: The COBOL word can be formed by using the characters as shown below: 0-9 A-Z (a-z) - (hyphen) The rules below should be hold in forming the COBOL words.

CR and DB (Credit and Debit Sign): The two characters that is CR or DB symbol may appear only at the rightmost place of the picture. They are similar to the minus sign edit ch

Common form of the READ statements: Format 1 is the common form of the READ statements. Format 2 is used when the access mode is either random or dynamic. For illustration,

SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa

FILE STATUS clause: This clause has been involved in the above syntax for completeness. The ORGANIZATION, REVERSE, ACCESS and STATUS clause can be specified in any order.