Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

Program to Describe The Functionality of the two dimension table

Posted By: Bathilda Schmidt     Category: Cobol     Views: 3103

Write a program to Describe The Functionality of the two dimention table.

Code for Program to Describe The Functionality of the two dimension table in Cobol

       IDENTIFICATION DIVISION.
        PROGRAM-ID. PROG.

       DATA DIVISION.
        01 MAT-DET.
         05 ROW1 OCCURS 2 TIMES.
          10 COL1 PIC 99 OCCURS 3 TIMES.
        01 I PIC 9.
        01 J PIC 9.

       PROCEDURE DIVISION.
        PARA1.
         PERFORM VARYING I FROM 1 BY 1 UNTIL I IS GREATER THAN 2
          PERFORM VARYING J FROM 1 BY 1 UNTIL J IS GREATER THAN 3

           DISPLAY "ENTER THE NO(" I ")(" J ")"
           ACCEPT COL1(I,J)

          END-PERFORM
         END-PERFORM.
         
         
      * FOR PRINTING PURPOSE
        
        PERFORM VARYING I FROM 1 BY 1 UNTIL I IS GREATER THAN 2
          PERFORM VARYING J FROM 1 BY 1 UNTIL J IS GREATER THAN 3
            DISPLAY "THE MARKS IS -->"COL1(I,J).

       STOP RUN.


*******
OUTPUT
*******

ENTER THE NO(1)(1)
10
ENTER THE NO(1)(2)
11
ENTER THE NO(1)(3)
13
ENTER THE NO(2)(1)
14
ENTER THE NO(2)(2)
15
ENTER THE NO(2)(3)
16
  
Share: 



Bathilda Schmidt
Bathilda Schmidt author of Program to Describe The Functionality of the two dimension table is from Frankfurt, Germany.
 
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!