Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

Program to Describe The Functionality of the Redefine

Posted By: Nathan Bouchard     Category: Cobol     Views: 2480

Write a Program to Describe The Functionality of the Redefine.

Code for Program to Describe The Functionality of the Redefine in Cobol

       IDENTIFICATION DIVISION.
         PROGRAM-ID. REDEF.

       DATA DIVISION.
        01 W-REC.
          02 W-DAYS.
            05 D1 PIC X(10) VALUE "SUNDAY".
            05 D2 PIC X(10) VALUE "MONDAY".
            05 D3 PIC X(10) VALUE "TUESDAY".
            05 D4 PIC X(10) VALUE "WEDNESDAY".
            05 D5 PIC X(10) VALUE "THURSDAY".
            05 D6 PIC X(10) VALUE "FRIDAY".
            05 D7 PIC X(10) VALUE "SATURDAY".
          02 W-DAYS1 REDEFINES W-DAYS  PIC X(10) OCCURS 7 TIMES.

         01 I PIC 9 VALUE 1.

       PROCEDURE DIVISION.
         BEGIN.

           PERFORM VARYING I FROM 1 BY 1 UNTIL I>7
             DISPLAY "DAY-" I " = "W-DAYS1(I)
           END-PERFORM.
           STOP RUN.
  
Share: 


Didn't find what you were looking for? Find more on Program to Describe The Functionality of the Redefine Or get search suggestion and latest updates.

Nathan Bouchard
Nathan Bouchard author of Program to Describe The Functionality of the Redefine is from Montreal, Canada.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!